This is my notebook for Coursera’s data science specialization certificate.
Data Science: Using data to answer question.
Data scientist: A data scientist is somebody who uses data to answer questions. A data scientist is somebody who combines the skills of software programmer, statistician and storyteller slash artist to extract the nuggets of gold hidden under mountains of data.
Why do we need data science? We have rich data and tools to analyses real world questions.
What is big data? There are a few qualities that characterize big data: Volume: huge amount of data Velocity: data is being generated and collected very fast Variety: The data we can analyse comes in many forms.
Data Science skills? Substantive Expertise: We need to have enough expertise in the area Hacking skills: Computer programing skills: cleaning and formatting Math & Statistics Knowledge: Analyze.
What is data? Wikipedia: A set of values of qualitative or quantitative variables. Measurements on a set of items.
We examined different sources of data that you may encounter, and emphasized the lack of tidy datasets. Examples of messy datasets, where raw data needs to be wrangled into an interpretable form, can include sequencing data, census data, electronic medical records, etc.
And finally, we return to our beliefs on the relationship between data and your question and emphasize the importance of question-first strategies. You could have all the data you could ever hope for, but if you don’t have a question to start, the data is useless.
Getting help Eric Raymond’s “How to ask questions the smart way”
The Data Science Process Every Data Science Project starts with a question that is to be answered with data. That means that forming the question is an important first step in the process. The second step is finding or generating the data you’re going to use to answer that question. With the question solidified and data in hand, the data are then analyzed, first by exploring the data and then often by modeling the data, which means using some statistical or machine learning techniques to analyze the data and answer your question. After drawing conclusions from this analysis, the project has to be communicated to others. Sometimes this is a report you send to your boss or team at work. Other times it’s a blog post. Often it’s a presentation to a group of colleagues. Regardless, a data science project almost always involves some form of communication of the projects’ findings. We’ll walk through these steps using a data science project example below.
Some cool data science projects: • Text analysis of Trump’s tweets confirms he writes only the (angrier) Android half, by David Robinson • Where to Live in the US, by Maelle Salmon • Sexual Health Clinics in Toronto, by Sharla Gelfand • “Hilary: the most poisoned baby name in US history”
Installing R: R is both a programming language and an environment. How to download R.
Installing R studio What is RStudio? RStudio is a graphical user interface for R, that allows you to write, edit and store code, generate, view and store plots, manage files, objects and dataframes, and integrate with version control systems – to name a few of its functions.
R packages There is a great website, RDocumentation, which is a search engine for packages and functions from CRAN, BioConductor, and GitHub (ie: the big three repositories) Installing from GitHub This is a more specific case that you probably won’t run into too often. In the event you want to do this, you first must find the package you want on GitHub and take note of both the package name AND the author of the package. Check out this guide for installing from GitHub, but the general workflow is: 1. install.packages(“devtools”) - only run this if you don’t already have devtools installed. If you’ve been following along with this lesson, you may have installed it when we were practicing installations using the R console 2. library(devtools) - more on what this command is doing immediately below this 3. install_github(“author/package”) replacing “author” and “package” with their GitHub username and the name of the package. Updating packages You can check what packages need an update with a call to the function old.packages() This will identify all packages that have been updated since you installed them/last updated them. To update all packages, use update.packages(). If you only want to update a specific package, just use once again install.packages(“packagename”) Unloading packages Sometimes you want to unload a package in the middle of a script - the package you have loaded may not play nicely with another package you want to use. To unload a given package you can use the detach() function. For example, detach(“package:ggplot2”, unload=TRUE) would unload the ggplot2 package (that we loaded earlier). Within the RStudio interface, in the Packages tab, you can simply unload a package by unchecking the box beside the package name. Uninstalling packages If you no longer want to have a package installed, you can simply uninstall it using the function remove.packages(). For example, remove.packages(“ggplot2”)
Use vignettes to learn examples of the related packages. If you still have questions about what functions within a package are right for you or how to use them, many packages include “vignettes.” These are extended help files, that include an overview of the package and its functions, but often they go the extra mile and include detailed examples of how to use the functions in plain words that you can follow along with to see how to use the package. To see the vignettes included in a package, you can use the browseVignettes() function. For example, let’s look at the vignettes included in ggplot2:browseVignettes(“ggplot2”) . You should see that there are two included vignettes: “Extending ggplot2” and “Aesthetic specifications.” Exploring the Aesthetic specifications vignette is a great example of how vignettes can be helpful, clear instructions on how to use the included functions.
Version Control Version control systems help to solve this problem by keeping a single, updated version of each file, with a record of all previous versions AND a record of exactly what changed between the versions. Git is a free and open source version control system Github is a cloud-based management system for your verision controlled files. Version control vocabulary There is a lot of vocabulary involved in working with Git, and often the understanding of one word relies on your understanding of a different Git concept. Take some time to familiarize yourself with the words below and read over it a few times to see how the concepts relate. Repository: Equivalent to the project’s folder/directory - all of your version controlled files (and the recorded changes) are located in a repository. This is often shortened to repo. Repositories are what are hosted on GitHub and through this interface you can either keep your repositories private and share them with select collaborators, or you can make them public - anybody can see your files and their history. Commit: To commit is to save your edits and the changes made. A commit is like a snapshot of your files: Git compares the previous version of all of your files in the repo to the current version and identifies those that have changed since then. Those that have not changed, it maintains that previously stored file, untouched. Those that have changed, it compares the files, logs the changes and uploads the new version of your file. We’ll touch on this in the next section, but when you commit a file, typically you accompany that file change with a little note about what you changed and why. When we talk about version control systems, commits are at the heart of them. If you find a mistake, you revert your files to a previous commit. If you want to see what has changed in a file over time, you compare the commits and look at the messages to see why and who. Push: Updating the repository with your edits. Since Git involves making changes locally, you need to be able to share your changes with the common, online repository. Pushing is sending those committed changes to that repository, so now everybody has access to your edits. Pull: Updating your local version of the repository to the current version, since others may have edited in the meanwhile. Because the shared repository is hosted online and any of your collaborators (or even yourself on a different computer!) could have made changes to the files and then pushed them to the shared repository, you are behind the times! The files you have locally on your computer may be outdated, so you pull to check if you are up to date with the main repository. Staging: The act of preparing a file for a commit. For example, if since your last commit you have edited three files for completely different reasons, you don’t want to commit all of the changes in one go; your message on why you are making the commit and what has changed will be complicated since three files have been changed for different reasons. So instead, you can stage just one of the files and prepare it for committing. Once you’ve committed that file, you can stage the second file and commit it. And so on. Staging allows you to separate out file changes into separate commits. Very helpful!
To summarize these commonly used terms so far and to test whether you’ve got the hang of this, files are hosted in a repository that is shared online with collaborators. You pull the repository’s contents so that you have a local copy of the files that you can edit. Once you are happy with your changes to a file, you stage the file and then commit it. You push this commit to the shared repository. This uploads your new file and all of the changes and is accompanied by a message explaining what changed, why and by whom.
Github and Git Install git and configure it for the use with Github, in preparation for linking it with RStudio.
Linking Git/GitHub and RStudio Not work for my mac. I just downloaded the git app to the mac. The terminal way is very bad.
As a data scientist, you are a scientist and as such, need to have the ability to design proper experiments to best answer your data science questions!
Experimental design is organizing an experiment so that you have the correct data (and enough of it!) to clearly and effectively answer your data science question.
Some terms: * dependent variables, * independet variables, * confounder. + an extraneous variable that may affect the relationship between the dependent and independent variables.
p-value. This is a value that tells you the probability that the results of your experiment were observed by chance
three qualities that are commonly attributed to big data sets: Volume, Velocity, Variety. From these three adjectives, we can see that big data involves large data sets of diverse data types that are being generated very rapidly.
# # The Data Scientist's Toolbox
# ###########
# # Week 1
# ###########
# # create a matrix
# example <- matrix(c(1, 2, 3, 4, 5, 6, 7, 8), nrow = 4, ncol = 2)
#
# # install packages
# # 1. install from CRAN
# # install.packages(c("ggplot2","devtools","lme4"))
#
# # 2. Installing from Bioconductor (another repository)
# # source("https://bioconductor.org/biocLite.R")
# # This makes the main install function of BioConductor, biocLite(), available to you. Following this, you call the package you want to install in quotes, between the parentheses of the biocLite command, like so: biocLite("GenomicFeatures")
# # BiocLite()
# # BiocLite("GenomicFeatures")
#
# # know the version and session info:
# version
# sessionInfo()
#
# browseVignettes("ggplot2")
#
# ###########
# # Week 4
# ###########
#
# # R markdown
#
# install.packages("rmarkdown")
# tinytex::install_tinytex()
#
#
# # install book down package
# install.packages("bookdown")
R is have five data type: vector, matrcies,list,factor,dataframe. R have five class: numeric, integer, complex,character, logical. R object can have attributes:dimension, length, class,name.
R have five basic or “atomic” classes of objects: * character * numeric(real numbers) * integer * complex * logical (True/False)
The most basic object is a vector. A vector can only contain objects of the same class
A list can contain objects of different classes.
R objects can have attributes * names, dimnames * dimensions (e.g. matrices, arrays) * class * length * other user-defined attributes/metadata
Attributes of an object can be accessed using the attributes() function
Vector: Vectors are the most basic R data objects and there are five types of atomic vectors. They are logical, integer, numeric, complex, character. List: Lists are a special type of vector that can contain elements of different classes. Matrices:Matrices are vectors with a dimension attribute. Arrary can have more than two dimensions. Factor: Factors are used to represent categorical data. Data frame: They are represented as a special type of list where every element of the list have the same length.
Vectors are the most basic R data objects and there are five types of atomic vectors. They are logical, integer, numeric, complex, character. The c() function can be used to create vectors of objects.
x <-c(0.5, 0.6) ## numeric
x <-c(T,T) ## logical
x <-c("a","b","c") ## character
x <- 9:29 ## integer
x <-c(1+0i,2+4i) ## complex
Using the vector() function, by default it will intialize the vector value.
x <-vector("numeric",length=10)
x
## [1] 0 0 0 0 0 0 0 0 0 0
What if you create a vector containing different class of objects. When different objects are mixed in a vector, coercion occurs so that every element in the vector is of the same class.
y <-c(1.7,"a") # numeric and character = character
class(y)
## [1] "character"
y <-c(T,2) # logical and numeric = numeric
class(y)
## [1] "numeric"
y<-c("a",T) # character and logical = character
class(y)
## [1] "character"
# character less common than logical, logical less common than numeric.
So what happens if you take a vect you create a vector and you mix two different types of objects and so the general it that is that r. Will kind of create the least common denominator vector so, will not give you an error but what will happen is that it will coerce the vector to be the, the class that’s kind of the least common denominator. So here, in the first example, I’ve got in trouble concatenating number 1.7 and letter a, so clearly these are not in the same class one is numeric, and the other is character. So the least common denominator here, is going to be character. And so we’re, so what you’re going to get is that y is going to be a character vector, where the first element is going to be the string 1.7 and the second element’s going to be the, the letter A so in the second example here, I’ve got concatenating true, which is a logical, and a two, which is numeric.
Objects can be explicitly coerced from one class to another using the as.* functions, if available.
x <-0:6
class(x)
## [1] "integer"
as.numeric(x)
## [1] 0 1 2 3 4 5 6
as.logical(x)
## [1] FALSE TRUE TRUE TRUE TRUE TRUE TRUE
as.character(x)
## [1] "0" "1" "2" "3" "4" "5" "6"
Nonsensical coercion results in NAs.
x <-c("a","b","c")
as.numeric(x)
## Warning: NAs introduced by coercion
## [1] NA NA NA
as.logical(x)
## [1] NA NA NA
as.complex(x)
## Warning: NAs introduced by coercion
## [1] NA NA NA
Lists are a special type of vector that can contain elements of different classes. Lists are a very important data type in R and you should get to know them well.
x <- list(1,"a",T,1+4i)
x
## [[1]]
## [1] 1
##
## [[2]]
## [1] "a"
##
## [[3]]
## [1] TRUE
##
## [[4]]
## [1] 1+4i
So you can see that in the double brackets here so the, the elements are indexed by double brackets so the first element is the vector 1. The second element is a vector with A. The third element is a vector with true and the fourth element is a vector. With the complex number 1 + (4i). So lists are indexed you’ll notice that el, elements of a list will have double brackets around them elements of other vectors just have the single brackets, so that’s one way to separate a list from other types of vectors
Matrices are vectors with a dimension attribute. The dimension attribute is itself an integer vector of length 2 (nrow,ncol).
m <-matrix(nrow =2,ncol=3)
m
## [,1] [,2] [,3]
## [1,] NA NA NA
## [2,] NA NA NA
dim(m)
## [1] 2 3
attributes(m)
## $dim
## [1] 2 3
Matrices are constructed column-wise, so entries can be thought of starting in the “upper left” corner and running down the columns.
m <- matrix(1:6, nrow=2,ncol=3)
m
## [,1] [,2] [,3]
## [1,] 1 3 5
## [2,] 2 4 6
Matrices can also be created directly from vectors by adding a dimension attribute.
m <- 1:10
m
## [1] 1 2 3 4 5 6 7 8 9 10
dim(m) <- c(2,5)
m
## [,1] [,2] [,3] [,4] [,5]
## [1,] 1 3 5 7 9
## [2,] 2 4 6 8 10
Matrices can be created by column-bingding or row-binding with cbind() and rbind()
x <- 1:3
y <- 10:12
cbind(x,y)
## x y
## [1,] 1 10
## [2,] 2 11
## [3,] 3 12
rbind(x,y)
## [,1] [,2] [,3]
## x 1 2 3
## y 10 11 12
Factors are used to represent categorical data. Factors can be unordered or ordered. One can think of a factor as an integer vector where each integer has a label. * Factors are treated specially by modelling functions like lm() and glm() * Using factors with labels is better than using integers because factors are self-describing; having a variable that has values “male” and “female’ is better than a variables that has values 1 and 2.
x <- factor(c("yes","yes","no","yes","no"))
x
## [1] yes yes no yes no
## Levels: no yes
table(x)
## x
## no yes
## 2 3
unclass(x) # show how R coded the factor
## [1] 2 2 1 2 1
## attr(,"levels")
## [1] "no" "yes"
attr(x,"levels")
## [1] "no" "yes"
The order of the levels can be set using the levels argument to factor(). This can be important in linear modelling because the first level is used as the baseline level.
x <- factor(c("yes","yes","no","yes","no"),levels=c("yes","no"))
x
## [1] yes yes no yes no
## Levels: yes no
table(x)
## x
## yes no
## 3 2
unclass(x) # show how R coded the factor
## [1] 1 1 2 1 2
## attr(,"levels")
## [1] "yes" "no"
attr(x,"levels")
## [1] "yes" "no"
Data Frames are used to store tabular data * They are represented as a special type of list where every element of the list have the same length. * unlike matrices, data frames can store different classes of objects in each column. Matrices must have every element be the same class. * Data frames also have a speecial attribute called row.names * can be converted to a matrix by calling data.matrix()
There are a number of operators that can be used to extract subsets of R objects. * [always returns an object of the same class as the orignial; can be used to select more than one element. * [[ is used to extract elements of a list or a data frame; it can only be used to extract a single element and the class of the returned object will not necessarily be a list of data frame. * $ is used to extract elements of a list or data frame by name; semantics are similar to [.
x <- c("a","b","c","c","d","a")
x[1]
## [1] "a"
x[2]
## [1] "b"
x[1:4]
## [1] "a" "b" "c" "c"
# subsetting using the name
x[x >"a"] #lexcical order
## [1] "b" "c" "c" "d"
u <-x >"a"
u
## [1] FALSE TRUE TRUE TRUE TRUE FALSE
# subsetting Lists
x <- list(foo =1:4, bar=0.6)
x
## $foo
## [1] 1 2 3 4
##
## $bar
## [1] 0.6
x[1] # a list
## $foo
## [1] 1 2 3 4
x[[1]] # the sequence ; a vector
## [1] 1 2 3 4
x$bar
## [1] 0.6
x[["bar"]]
## [1] 0.6
x["bar"]
## $bar
## [1] 0.6
# extract multiple element in a list
x <-list(foo=1:4, bar=0.6, baz="hello")
x[c(1,3)] # I want the first and the third element.
## $foo
## [1] 1 2 3 4
##
## $baz
## [1] "hello"
The [[ operator can be used with computed indices; $ can only be used with literal names.
x <- list(foo=1:4, bar=0.6, baz="hello")
name <- "foo" # computed index for 'foo'
x[[name]]
## [1] 1 2 3 4
x$name # element 'name' doesn't exist
## NULL
Subsetting Nested elements of a list. The [[ can take an integer sequence.
x <-list(a=list(10,12,14), b=c(3.14,2.81))
x[[c(1,3)]]
## [1] 14
x[[1]][[3]]
## [1] 14
x[[c(2,1)]]
## [1] 3.14
matrices can be subsetted in the usual way with (i,j) type indices.
x <- matrix(1:6,2,3)
x[1,2]
## [1] 3
x[2,1]
## [1] 2
x[1,]
## [1] 1 3 5
x[,2]
## [1] 3 4
# By default, when a signle element of a matrix is retrieved, it is returned as a vector of length 1 rather than a 1*1 matrix. This behavior can be turned off by setting drop=F
x[1,2]
## [1] 3
x[1,2,drop=F] # always return element with same class.
## [,1]
## [1,] 3
# Partial matching of names is allowed with [[ and $
x <- list(aardaark=1:5)
x$a
## [1] 1 2 3 4 5
x[["a"]]
## NULL
x[["a", exact=F]]
## [1] 1 2 3 4 5
y <-list(aaax=1:5,aaab=6:9)
y$a
## NULL
x <-c(1,2,NA)
x[!is.na(x)]
## [1] 1 2
# complete cases of very handy function which is when, when you have multiple sets of vectors or data, or large data frames or you want to subset all out, all the missing values.
x <- c(1,2,NA,4,NA,NA)
y <-c("a",NA,NA,"d",NA,"f")
good <- complete.cases(x,y)
good
## [1] TRUE FALSE FALSE TRUE FALSE FALSE
x[good] # x element where the related observation do not contains any missing value.
## [1] 1 4
y[good]
## [1] "a" "d"
# dataframe
airquality[1:6,]
## Ozone Solar.R Wind Temp Month Day
## 1 41 190 7.4 67 5 1
## 2 36 118 8.0 72 5 2
## 3 12 149 12.6 74 5 3
## 4 18 313 11.5 62 5 4
## 5 NA NA 14.3 56 5 5
## 6 28 NA 14.9 66 5 6
good <- complete.cases(airquality)
airquality[good,][1:6,]
## Ozone Solar.R Wind Temp Month Day
## 1 41 190 7.4 67 5 1
## 2 36 118 8.0 72 5 2
## 3 12 149 12.6 74 5 3
## 4 18 313 11.5 62 5 4
## 7 23 299 8.6 65 5 7
## 8 19 99 13.8 59 5 8
# be caucious for the "".
x <- c(1,2,NA,4,NA,NA)
y <-c("a",NA,NA,"",NA,"f")
good <- complete.cases(x,y)
good
## [1] TRUE FALSE FALSE TRUE FALSE FALSE
x[good]
## [1] 1 4
# get working directory
getwd()
## [1] "/Users/wei/Documents/GitHub/Coursera_Data_Science_Certificate/Notebook"
# change working directory
setwd("~/Documents/GitHub/Coursera_Data_Science_Certificate")
“<-” symbol is the assignment operator. Assign a value to a symbol
x <-1
# two way to print the x
print(x)
## [1] 1
x
## [1] 1
msg <- "hello"
print(msg)
## [1] "hello"
Numbers in R a generally treated as numeric objects (i.e. double precision real numbers)
If you explicitly want an integer, you need to specify the L suffix
Ex: Entering 1 gives you a numeric object; entering 1L explicitly gives you an integer.
There is also a special number Inf which represents infinity; e.g. 1/0; Inf can be used in ordinary calculations; e.g. 1/Inf is 0
1/Inf
## [1] 0
The value NaN represents an undefined values (” not a number); e.g 0/0 NaN can also be thought of as a missing value.
0/0
## [1] NaN
Missing values are denoted by NA or NaN for undefined athematical operations. * is.na() is used to test objects if they are NA * is.nan() is usest to test for NaN * Na values have a class also, so there are integer NA, character NA, etc. * A NAN value is also NA but the converse is not true. * “” is not na
x <-data.frame(foo=1:4,bar=c(T,T,F,F))
x
## foo bar
## 1 1 TRUE
## 2 2 TRUE
## 3 3 FALSE
## 4 4 FALSE
nrow(x)
## [1] 4
ncol(x)
## [1] 2
x <- c(1,2,NA,10,3)
is.na(x)
## [1] FALSE FALSE TRUE FALSE FALSE
is.nan(x)
## [1] FALSE FALSE FALSE FALSE FALSE
x<-c(1,2,NaN,NA,4)
is.na(x)
## [1] FALSE FALSE TRUE TRUE FALSE
is.nan(x)
## [1] FALSE FALSE TRUE FALSE FALSE
x <-c("a","","b")
is.na(x)
## [1] FALSE FALSE FALSE
x <-replace(x,x=="",NA)
is.na(x)
## [1] FALSE TRUE FALSE
R objects can also have names, which is very useful for writing readable code and self-describing objects.
x <- 1:3
names(x)
## NULL
names(x) <- c("foo","bar","norf")
names(x)
## [1] "foo" "bar" "norf"
List can also have names.
x <-list(a=1,b=2,c=3)
x
## $a
## [1] 1
##
## $b
## [1] 2
##
## $c
## [1] 3
matrices can have names
m <- matrix(1:4, nrow =2 , ncol =2)
dimnames(m) <- list(c("a","b"), c("c","d"))
m
## c d
## a 1 3
## b 2 4
# initial <- read.table("datatable.txt",nrows=100)
# classes <- sapply(initial, class)
# tabAll <- read.table("datatable.txt",colClasses =classes)
The dput() is used to create a minimal reproducible example, when you have question that you would like to ask on the website, you need to prepare a minimal reprocuible example, so others can use that to reprocduce your error.
When you have quesitons, but your did not what to upload all the data, you can use this function to generate the minimal amount of data.
Data are read in using connection interfaces. Connections can be made to files (most common) or to other more exotic things.
Many operations in R are vectorized making code more efficient, concise, and easier to read.
x <- 1:4
y <- 6:9
x+y
## [1] 7 9 11 13
x >3
## [1] FALSE FALSE FALSE TRUE
x*y
## [1] 6 14 24 36
# matrices
x <-matrix(1:4,2,2);y <- matrix(rep(10,4),2,2)
x*y
## [,1] [,2]
## [1,] 10 30
## [2,] 20 40
x/y
## [,1] [,2]
## [1,] 0.1 0.3
## [2,] 0.2 0.4
x %*% y ## true matrix multiplication
## [,1] [,2]
## [1,] 40 40
## [2,] 60 60
# install dplyr package
# install.packages("dplyr")
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
# import the dataset
data1 <-read.csv("../Data/hw1_data.csv")
# get the class of each column
lapply(data1,class)
## $Ozone
## [1] "integer"
##
## $Solar.R
## [1] "integer"
##
## $Wind
## [1] "numeric"
##
## $Temp
## [1] "integer"
##
## $Month
## [1] "integer"
##
## $Day
## [1] "integer"
# check the column names of the dataset
head(data1)
## Ozone Solar.R Wind Temp Month Day
## 1 41 190 7.4 67 5 1
## 2 36 118 8.0 72 5 2
## 3 12 149 12.6 74 5 3
## 4 18 313 11.5 62 5 4
## 5 NA NA 14.3 56 5 5
## 6 28 NA 14.9 66 5 6
# Extract the first 2 rows of the data frame and print them to the console.
head(data1,n=2)
## Ozone Solar.R Wind Temp Month Day
## 1 41 190 7.4 67 5 1
## 2 36 118 8.0 72 5 2
# Extract the last 2 rows
tail(data1, n=2)
## Ozone Solar.R Wind Temp Month Day
## 152 18 131 8.0 76 9 29
## 153 20 223 11.5 68 9 30
# the value of Ozone in the 47 row
data1[47,"Ozone"]
## [1] 21
# how many missing values
sum(is.na(data1$Ozone))
## [1] 37
# mean
mean(data1$Ozone,na.rm=T)
## [1] 42.12931
# Extract the subset of rows of the data frame where Ozone values are above 31 and Temp values are above 90. What is the mean of Solar.R in this subset?
data2 <- data1 %>%
filter(Ozone>31 & Temp>90 & !is.na(Ozone) & !is.na(Temp))
mean(data2$Solar.R,na.rm=T)
## [1] 212.8
# What is the mean of "Temp" when "Month" is equal to 6?
data3 <-data1 %>%
filter(Month==6)
mean(data3$Temp,na.rm=T)
## [1] 79.1
# What was the maximum ozone value in the month of May (i.e. Month is equal to 5)?
data4 <-data1 %>%
filter(Month==5)
max(data4$Ozone, na.rm=T)
## [1] 115
Control structures in R allow you to control the flow of execution of the program, depending on runtime conditions. Common structures are
age <- 20
if (age > 18){
print ("Major")
} else {
print ("Minor")
}
## [1] "Major"
#ifelse short sytax
age <- 20
ifelse(age>=18, "Major", "Minor")
## [1] "Major"
# nested ifelse
x <- 0
if (x<0){
print ("negative")
} else if (x>0){
print ("positive")
} else {
print ("Zero")
}
## [1] "Zero"
#alternatively
x<-0
ifelse(x<0,"negative",ifelse(x==0,"Zero","positive"))
## [1] "Zero"
x <- c("a","b","c","d")
for(i in 1:4){
print(x[i])
}
## [1] "a"
## [1] "b"
## [1] "c"
## [1] "d"
for (i in seq_along(x)) {
print(x[i])
}
## [1] "a"
## [1] "b"
## [1] "c"
## [1] "d"
for (letter in x) {
print(letter)
}
## [1] "a"
## [1] "b"
## [1] "c"
## [1] "d"
Nested for loops
x <- matrix(1:6, 2,3)
for (i in seq_len(nrow(x))) {
for (j in seq_len(ncol(x))) {
print(x[i,j])
}
}
## [1] 1
## [1] 3
## [1] 5
## [1] 2
## [1] 4
## [1] 6
Be careful with nesting though. Nesting beyond 2-3 levels is often very difficult to read/understand
While loops begin by testing a condition. If it is true, then they execute the loop body. Once the loop body is execured, the condition is tested again, and so forth.
count <-0
while(count < 10){
print(count)
count <- count +1
}
## [1] 0
## [1] 1
## [1] 2
## [1] 3
## [1] 4
## [1] 5
## [1] 6
## [1] 7
## [1] 8
## [1] 9
While if treated not properly, it may have infinite loop, use for loop instead of while loop.
Repeat intiate an infinite loop; these are not commonly used in statistical applications but they do have their uses. The only way to exit a repeat looop is to call break
# x0 <-1
# tol <- 1e-8
# repeat{
# x1 <- computeEstimate()
#
# if(abs(x1-x0) < tol) {
# break
# } else{
# x0 <- x1
# }
# }
The loop in the previous slide is a bit dangerous because there’s no guarantee it will stop. Better to set a hard limit on the number of iteration (e,g. using a for loop) and then report whether convergence was achieved or not.
next is used to skip an iteration of a loop
for (i in 1:100) {
if(i <=20){
## skip the first 20 iterations
next
}
## do something here
}
“return” signals that a function should exit and return a given value
# add two number
add2 <- function(x,y) {
x + y
}
add2(3,4)
## [1] 7
# take a vector number and return the number bigher than 10.
above10 <- function(x){
use <- x > 10
x[use]
}
# take a vector number and return the number bigher than a number.
above <-function(x,n){
use <- x>n # logical statement
x[use]
}
x <-1:20
above(x,3)
## [1] 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# set up a default number
above <-function(x,n=10){
use <- x>n # logical statement
x[use]
}
x <-1:20
above(x)
## [1] 11 12 13 14 15 16 17 18 19 20
above(x,5)
## [1] 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
# calculate the mean of each vector
columnmean <- function(y, removeNA=TRUE){
nc <- ncol(y)
means <- numeric(nc) # a vecctor with zero entry.
for (i in 1:nc) {
means[i] <- mean(y[,i], na.rm=removeNA)
}
means
}
x <- matrix(1:18,2,9)
columnmean(x)
## [1] 1.5 3.5 5.5 7.5 9.5 11.5 13.5 15.5 17.5
columnmean(airquality)
## [1] 42.129310 185.931507 9.957516 77.882353 6.993464 15.803922
columnmean(airquality,FALSE)
## [1] NA NA 9.957516 77.882353 6.993464 15.803922
The … argument indicate a variable number of arguments that are usually passed on to other functions.
myplot <- function(x,y,type="1",...) {
plot(x,y,type=type,...)
}
search() # give searh path for R objects, give a list of attached packages and R objects, usually data.frames.
## [1] ".GlobalEnv" "package:dplyr" "package:stats"
## [4] "package:graphics" "package:grDevices" "package:utils"
## [7] "package:datasets" "package:methods" "Autoloads"
## [10] "package:base"
Lexical scoping
f <- function(x,y){
x^2 + y/z
}
z <- 3
f(4,2)
## [1] 16.66667
# z is a free variable.
Environment is a collection of (symbo,value) pairs.
make a function inside another function
scoping rule, define a lm() function, why it does not recoganize it as a part of stat package, because r have a coping rule.it search is first found in the environment in which a function was defined, then search for it in the parent environment, then search for it until the golobal environment, thencontinue down the search list until we hit the empty environment
make.power <- function(n) {
pow <- function(x){
x^n
}
pow
}
cube <- make.power(3)
suqre <- make.power(2)
cube(3)
## [1] 27
suqre(3)
## [1] 9
# what's in a function's environment?
ls(environment(cube))
## [1] "n" "pow"
```{r} y <- 10
f <- function(x){ y <-2 y^2 + g(x) }
g <- function(x){
x*y
}
f(3)
with lexical scoping the value of y in the function g is looked up in the environment in which the funciton was defined, in this case the global environment, so the value of y is 10.
R has developed a special representation of dates and times * Dates are represented by the Date class * Times are represented by the POSIXct or the POSIXLt clas * Date are stored internally as the number of days since 1970=01-01 * TImes are stored internally as the number of seconds since 1970=01-01
Dates in R Dates are represend by the date class and can be coerced from a character string using the as.Date() funciton.
x <-as.Date("1970-01-01")
x
## [1] "1970-01-01"
y <- as.Date("1993-11-18")
unclass(x)
## [1] 0
unclass(y) # how many days from 1970-01-01 untill 1993-11-18
## [1] 8722
Times are represented using the POSIcct or pOSiclt class * POSIXct is juest a very large integer under the hood; it uses a useful class when you want to store timesi n someting like a data frame.
There are number of generic functions that work on dates and times;
Times can be coerced from a character string using the as.POSIXlt or as.POSIXct fucntion.
x <- Sys.time()
x
## [1] "2022-12-12 15:14:53 EST"
p <- as.POSIXlt(x)
p
## [1] "2022-12-12 15:14:53 EST"
class(x)
## [1] "POSIXct" "POSIXt"
class(p)
## [1] "POSIXlt" "POSIXt"
unclass(p)
## $sec
## [1] 53.24007
##
## $min
## [1] 14
##
## $hour
## [1] 15
##
## $mday
## [1] 12
##
## $mon
## [1] 11
##
## $year
## [1] 122
##
## $wday
## [1] 1
##
## $yday
## [1] 345
##
## $isdst
## [1] 0
##
## $zone
## [1] "EST"
##
## $gmtoff
## [1] -18000
##
## attr(,"tzone")
## [1] "" "EST" "EDT"
names(unclass(p))
## [1] "sec" "min" "hour" "mday" "mon" "year" "wday" "yday"
## [9] "isdst" "zone" "gmtoff"
p$sec
## [1] 53.24007
Finally, there is the strptime funciton in case your dates are written in a different format
datestring <- c("January 10, 2012 10:40", "December 9, 2011 9:10")
x <-strptime(datestring, "%B %d,%Y %H:%M")
x
## [1] "2012-01-10 10:40:00 EST" "2011-12-09 09:10:00 EST"
class(x)
## [1] "POSIXlt" "POSIXt"
You can use mathematical operations on dates and times. Well, really just + and -, you can do comparisons too (oe. ==, <=)
# x <- as.Date("2012-01-01")
# class(x)
# y <- strptime("9 Jan 2011 11:34:21", "%d %b %Y %J:%M:%S")
# z <- strptime("9 Jan 2011", "%d %b %Y")
# class(y)
#
# x-y
# x-z
# x <- as.POSIXlt(x)
# x-y
# x-z
#
#
# n <- as.Date("9 Jan 2011", "%d %b %Y")
# x <- as.Date("2012-01-01")
# x-n
Even keeps track of leap years, leap seconds, daylight savings, and time zones.
x <-as.Date("2012-03-01")
y <-as.Date("2012-02-28")
x-y
## Time difference of 2 days
x <-as.POSIXct("2012-10-25 01:00:00")
y <- as.POSIXct("2012-10-25 06:00:00", tz="GMT") # change time zone
y-x
## Time difference of 1 hours
summary * dates and times have special classes in R that allow for numerical and statistical calculations * dates use the date class * ITme use the POSIXct and POSIXlt class * character strings can be coerced to Date/Time classes using the strptyime function or the as.Date, as.POSIXlt, or as.POSIXct.
# # Write a function named 'pollutantmean' that calculates the mean of a pollutant (sulfate or nitrate) across a specified list of monitors. The function 'pollutantmean' takes three arguments: 'directory', 'pollutant', and 'id'. Given a vector monitor ID numbers, 'pollutantmean' reads that monitors' particulate matter data from the directory specified in the 'directory' argument and returns the mean of the pollutant across all of the monitors, ignoring any missing values coded as NA. A prototype of the function is as follows
#
# getwd()
#
# pollutantmean <- function(directory,pollutant, id=1:332) {
#
# full <- NA
#
# for (x in id){
# path <- paste("./","data/",directory,"/",sprintf("%.3d",x),".csv",sep="")
# rcsv <- read.csv(path)
# full<-rbind(full,rcsv)
# }
#
# x<-mean(full[,pollutant],na.rm=T)
# x
# }
#
# # Test
# pollutantmean("specdata","nitrate", 70:72)
# pollutantmean("specdata","nitrate", 23)
#
# # save the above as a function
#
#
# # Write a function that reads a directory full of files and reports the number of completely observed cases in each data file. The function should return a data frame where the first column is the name of the file and the second column is the number of complete cases. A prototype of this function follows
#
#
# # library(dplyr)
# # complete <- function(directory, id=1:332){
# #
# # full <-NA
# #
# # for (x in id){
# # path <- paste("./","data/",directory,"/",sprintf("%.3d",x),".csv",sep="")
# # rcsv <- read.csv(path)
# # full<-rbind(full,rcsv)
# # }
# #
# # results <-full %>%
# # mutate(a=case_when(((!is.na(sulfate))&(!is.na(nitrate)))~1,TRUE~0)) %>%
# # group_by(ID) %>%
# # mutate(nobs=sum(a)) %>%
# # filter(row_number()==1 & !is.na(ID)) %>%
# # ungroup() %>%
# # select(ID,nobs)
# # results<-as.data.frame(results)
# # results
# # }
# #
# #
# #
# # xx<-complete("specdata",30:25)
# # x<-complete("specdata",3)
# #
# # # Write a function that takes a directory of data files and a threshold for complete cases and calculates the correlation between sulfate and nitrate for monitor locations where the number of completely observed cases (on all variables) is greater than the threshold. The function should return a vector of correlations for the monitors that meet the threshold requirement. If no monitors meet the threshold requirement, then the function should return a numeric vector of length 0. A prototype of this function follows.
# #
# # source("./2_R Programming/complete.R")
# # corr <- function(directory, threshold=0){
# #
# # for (x in 1:332){
# # path <- paste("./","data/",directory,"/",sprintf("%.3d",x),".csv",sep="")
# # rcsv <- read.csv(path)
# # full<-rbind(full,rcsv)
# # }
# #
# # nobs <- complete(directory)
# #
# # full_nobs <- left_join(full,nobs, by="ID")
# #
# # results <- full_nobs %>%
# # group_by(ID) %>%
# # mutate(correlation=cor(sulfate,nitrate,use="na.or.complete")) %>%
# # filter(row_number()==1) %>%
# # ungroup() %>%
# # select(ID,nobs,correlation) %>%
# # filter(nobs>threshold)
# #
# # vec <-results$correlation
# # }
# #
# #
# # cr<-corr("specdata")
# #
# # summary(cr)
# # length(cr)
# #
# # cr<-corr("specdata",5000)
# # summary(cr)
#
# ```
#
# QUIZ
#
# ```{r}
# # # 1 might be faster
# # pollutantmean <- function(directory, pollutant, id = 1:332) {
# # ## 'directory' is a character vector of length 1 indicating
# # ## the location of the CSV files
# #
# # ## 'pollutant' is a character vector of length 1 indicating
# # ## the name of the pollutant for which we will calcultate the
# # ## mean; either "sulfate" or "nitrate"
# #
# # ## 'id' is an integer vector indicating the monitor ID numbers
# # ## to be used
# #
# # ## Return the mean of the pollutant across all monitors list
# # ## in the 'id' vector (ignoring NA values)
# # ## NOTE: Do not round the result
# # means <- c()
# #
# # for(monitor in id){
# # path <- paste(getwd(), "/", directory, "/", sprintf("%03d", monitor), ".csv", sep = "")
# # monitor_data <- read.csv(path)
# # interested_data <- monitor_data[pollutant]
# # means <- c(means, interested_data[!is.na(interested_data)])
# # }
# #
# # mean(means)
# # }
# #
# # # 3 might be faster
# # corr <- function(directory, threshold = 0){
# # ## 'directory' is a character vector of length 1 indicating
# # ## the location of the CSV files
# #
# # ## 'threshold' is a numeric vector of length 1 indicating the
# # ## number of completely observed observations (on all
# # ## variables) requi?red to compute the correlation between
# # ## nitrate and sulfate; the default is 0
# #
# # ## Return a numeric vector of correlations
# # ## NOTE: Do not round the result!
# # cor_results <- numeric(0)
# #
# # complete_cases <- complete(directory)
# # complete_cases <- complete_cases[complete_cases$nobs>=threshold, ]
# # #print(complete_cases["id"])
# # #print(unlist(complete_cases["id"]))
# # #print(complete_cases$id)
# #
# # if(nrow(complete_cases)>0){
# # for(monitor in complete_cases$id){
# # path <- paste(getwd(), "/", directory, "/", sprintf("%03d", monitor), ".csv", sep = "")
# # #print(path)
# # monitor_data <- read.csv(path)
# # #print(monitor_data)
# # interested_data <- monitor_data[(!is.na(monitor_data$sulfate)), ]
# # interested_data <- interested_data[(!is.na(interested_data$nitrate)), ]
# # sulfate_data <- interested_data["sulfate"]
# # nitrate_data <- interested_data["nitrate"]
# # cor_results <- c(cor_results, cor(sulfate_data, nitrate_data))
# # }
# # }
# # cor_results
# # }
#
#
# source("./2_R Programming/pollutantmean.R")
# source("./2_R Programming/complete.R")
# source("./2_R Programming/corr.R")
#
# pollutantmean("specdata", "sulfate", 1:10)
# pollutantmean("specdata", "nitrate", 70:72)
# pollutantmean("specdata", "sulfate", 34)
# pollutantmean("specdata", "nitrate")
#
# cc <- complete("specdata", c(6, 10, 20, 34, 100, 200, 310))
# print(cc$nobs)
#
# cc <- complete("specdata", 54)
# print(cc$nobs)
#
# #2 FASTER musch better
# complete <- function(directory, id = 1:332){
# ## 'director' is a character vector of length 1 indicating
# ## the location of the CSV files
#
# ## 'id' is an integer vector indicating the monitor ID numbers
# ## to be used
#
# ## Return a data frame of the from:
# ## id nobs
# ## 1 117
# ## 2 1041
# ## ...
# ## where 'id' is the monitor ID number and 'nobs' is the
# ## number of complete cases
# results <- data.frame(id=numeric(0), nobs=numeric(0))
# for(monitor in id){
# path <- paste("./","data/",directory,"/",sprintf("%.3d",monitor),".csv",sep="")
# monitor_data <- read.csv(path)
# interested_data <- monitor_data[(!is.na(monitor_data$sulfate)), ]
# interested_data <- interested_data[(!is.na(interested_data$nitrate)), ]
# nobs <- nrow(interested_data)
# results <- rbind(results, data.frame(id=monitor, nobs=nobs))
# }
# results
# }
#
# RNGversion("3.5.1")
# set.seed(42)
# cc <- complete("specdata", 332:1)
# use <- sample(332, 10)
# print(cc[use, "nobs"])
#
# cr <- corr("specdata")
# cr <- sort(cr)
# RNGversion("3.5.1")
# set.seed(868)
# out <- round(cr[sample(length(cr), 5)], 4)
# print(out)
#
# cr <- corr("specdata", 129)
# cr <- sort(cr)
# n <- length(cr)
# RNGversion("3.5.1")
# set.seed(197)
# out <- c(n, round(cr[sample(n, 5)], 4))
# print(out)
#
# cr <- corr("specdata", 2000)
# n <- length(cr)
# cr <- corr("specdata", 1000)
# cr <- sort(cr)
# print(c(n, round(cr, 4)))
#
# lapply always returns a list , regardless of the class of the input
x <-list(a=1:5,b=rnorm(10))
lapply(x,mean)
## $a
## [1] 3
##
## $b
## [1] -0.1866581
# anaymous function for extracting the first column of each matrix
x <-list(a=matrix(1:4, 2,2), b=matrix(1:6,3,2))
x
## $a
## [,1] [,2]
## [1,] 1 3
## [2,] 2 4
##
## $b
## [,1] [,2]
## [1,] 1 4
## [2,] 2 5
## [3,] 3 6
lapply(x,function(elt) elt[,1])
## $a
## [1] 1 2
##
## $b
## [1] 1 2 3
sapply will try to simplify the result of lapply if possible. * if the result is a list where every element is length 1, then a vector is returned * if the result is a list where every eleemnent is a vector of the same length(>1), a matrix is returned. * if it can’t figure things out, a list is returend.
apply is used to evaluate a function (often an anonymous one) over the margins of an array. * if is most often used to apply a fucntion to the rows or columns of a matrix * if can be sued with general arrays,e.g. taking the average of an array of matrices * if is not really faster than writing a loop, but it works in one line!
array is a vector has dimension attached to it. a matrix is a two dimensional array.
x <-matrix(rnorm(200),20,10)
# 2 means pass the function to each column
apply(x,2,mean)
## [1] -0.384887337 0.023777787 -0.006475793 0.572331367 0.061825351
## [6] -0.088651818 -0.203253311 -0.334171373 -0.097099637 0.169676942
# 1 means pass the function to each row
apply(x,1,sum)
## [1] -4.01136704 0.10485164 -2.58301846 -0.26681636 3.25832809 1.19363931
## [7] -1.34421075 3.00278607 -4.88235967 0.05176391 1.92226815 -0.39258860
## [13] 4.75934813 -0.89500830 -0.66276031 -0.67738082 2.50753524 1.28942378
## [19] -4.42320688 -3.68978357
# For sums and means of matrix dimensions, we have some shortcuts.
# rowSums=apply(x,1,sum)
# rowMeans=apply(x,1,mean)
# colSums=apply(x,2,sum)
# colMeans=apply(x,2,mean)
x <-matrix(rnorm(200),20,10)
apply(x,1,quantile,probs=c(0.25,0.75)) # for each row, two line report
## [,1] [,2] [,3] [,4] [,5] [,6]
## 25% -0.5144582 -0.3008597 -0.3365292 -0.2666854 -0.6383236 -0.9676114
## 75% 1.0140023 0.9718227 0.8551695 0.9117487 0.2483074 0.5586648
## [,7] [,8] [,9] [,10] [,11] [,12]
## 25% -0.1144520 -0.5148152 -0.64149489 -0.8004039 -0.8000563 -0.8882266
## 75% 0.7066669 1.0640268 0.03036087 0.3528416 0.6511011 0.7170751
## [,13] [,14] [,15] [,16] [,17] [,18]
## 25% -0.07590375 0.04013756 -0.2849336 -0.5192974 -0.9227459 -0.5394082
## 75% 0.85743312 1.12823153 0.4305149 0.6387993 0.7034466 1.4013457
## [,19] [,20]
## 25% -0.93388887 -0.7359109
## 75% -0.09296779 1.2690149
a <- array(rnorm(2*2*10),c(2,2,10))
a
## , , 1
##
## [,1] [,2]
## [1,] 1.195492 0.26474392
## [2,] 0.193286 -0.03522272
##
## , , 2
##
## [,1] [,2]
## [1,] -0.52213407 0.8407511
## [2,] 0.03196943 -0.7653568
##
## , , 3
##
## [,1] [,2]
## [1,] 0.4612552 2.5687702
## [2,] 1.2869093 -0.4152069
##
## , , 4
##
## [,1] [,2]
## [1,] -0.8733966 0.6248820
## [2,] -1.2412370 0.5586125
##
## , , 5
##
## [,1] [,2]
## [1,] 0.1034446 0.7362299
## [2,] 0.3005623 -1.0792540
##
## , , 6
##
## [,1] [,2]
## [1,] -0.3903477 -0.3559669
## [2,] 0.5201381 0.4265609
##
## , , 7
##
## [,1] [,2]
## [1,] 0.4733110 -0.4957877
## [2,] -0.9362402 -0.3778814
##
## , , 8
##
## [,1] [,2]
## [1,] -1.1822617 -1.429960
## [2,] 0.8610738 0.479317
##
## , , 9
##
## [,1] [,2]
## [1,] -1.149511 0.2100223
## [2,] 1.893581 0.1828451
##
## , , 10
##
## [,1] [,2]
## [1,] -2.181171 -0.2729853
## [2,] -1.352447 -0.9145669
apply(a,c(1,2),mean) # collapse the third dimension.
## [,1] [,2]
## [1,] -0.4065319 0.2690700
## [2,] 0.1557596 -0.1940153
rowMeans(a, dims=2)
## [,1] [,2]
## [1,] -0.4065319 0.2690700
## [2,] 0.1557596 -0.1940153
mapply is a multivariate apply of sorts which applies a function in parallel over a set of arguments.
# The following is tedious to type
list(rep(1,4),rep(2,3),rep(3,2),rep(4,1))
## [[1]]
## [1] 1 1 1 1
##
## [[2]]
## [1] 2 2 2
##
## [[3]]
## [1] 3 3
##
## [[4]]
## [1] 4
# instead we can do
mapply(rep, 1:4,4:1)
## [[1]]
## [1] 1 1 1 1
##
## [[2]]
## [1] 2 2 2
##
## [[3]]
## [1] 3 3
##
## [[4]]
## [1] 4
vectorizing a function
noise <- function(n,mean,sd) {
rnorm(n,mean,sd)
}
mapply(noise,1:5,1:5,2)
## [[1]]
## [1] -0.2796253
##
## [[2]]
## [1] -0.7715426 0.7128950
##
## [[3]]
## [1] 5.4787806 2.3989167 0.5193307
##
## [[4]]
## [1] 2.0902661 0.2739412 4.2054075 5.7972823
##
## [[5]]
## [1] 3.402506 8.850193 5.224416 4.117203 7.300289
tapply is used to apply a function over subsets of a vector.
# take group means
str(tapply)
## function (X, INDEX, FUN = NULL, ..., default = NA, simplify = TRUE)
# x is a vector
# index is a factor or a list of factors
# fun is a function to be applied
# simplify, should we simplify the results?
x <- c(rnorm(10),runif(10),rnorm(10,1))
x
## [1] -1.9530536 -0.8890494 -0.5474696 -0.2920880 0.4328068 -0.7330734
## [7] 0.7492089 -0.4357303 -0.4787891 -0.3521036 0.2119030 0.6541679
## [13] 0.1689355 0.4887188 0.2675069 0.9347861 0.9275142 0.6929194
## [19] 0.1925838 0.7886075 1.3176254 -0.9808342 1.1559721 1.6496613
## [25] 0.8158955 1.3689948 1.9398115 2.1256521 1.4118044 1.2484204
f <- gl(3,10) # generate factor level
f
## [1] 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3
## Levels: 1 2 3
tapply(x,f,mean)
## 1 2 3
## -0.4499341 0.5327643 1.2053003
tapply(x,f,mean, simplify=F)
## $`1`
## [1] -0.4499341
##
## $`2`
## [1] 0.5327643
##
## $`3`
## [1] 1.2053
tapply(x,f,range)
## $`1`
## [1] -1.9530536 0.7492089
##
## $`2`
## [1] 0.1689355 0.9347861
##
## $`3`
## [1] -0.9808342 2.1256521
split takes a vector or other objects and splits it into groups determined by a factor or list of factors
str(split)
## function (x, f, drop = FALSE, ...)
# x is a vector (or) list or data frame
# f is a factor (or coerced to one) or a list of factors
# drop indicates whether empty factors levels should be dropped
x <- c(rnorm(10), runif(10), rnorm(10,1))
f <- gl(3,10)
split(x,f) # split always return a list back so you can use lapply or sapply
## $`1`
## [1] 0.77191517 0.84172368 0.64496158 -0.06281806 -1.52460670 0.10031263
## [7] -0.31408818 0.75974481 -0.92279417 -0.30064507
##
## $`2`
## [1] 0.11769696 0.18748257 0.95307847 0.74800326 0.20658687 0.46935286
## [7] 0.09097327 0.08914456 0.16947099 0.59634110
##
## $`3`
## [1] 0.69647124 -0.77221595 1.09560620 1.55347742 -0.62729197 0.06046179
## [7] 1.48082677 1.95200018 0.63581882 -0.05853180
# a common idiom is split followed by an lapply
# The following two are the same.
lapply(split(x,f),mean)
## $`1`
## [1] -0.000629431
##
## $`2`
## [1] 0.3628131
##
## $`3`
## [1] 0.6016623
tapply(x,f,mean,simplify=F)
## $`1`
## [1] -0.000629431
##
## $`2`
## [1] 0.3628131
##
## $`3`
## [1] 0.6016623
library(datasets)
head(airquality)
## Ozone Solar.R Wind Temp Month Day
## 1 41 190 7.4 67 5 1
## 2 36 118 8.0 72 5 2
## 3 12 149 12.6 74 5 3
## 4 18 313 11.5 62 5 4
## 5 NA NA 14.3 56 5 5
## 6 28 NA 14.9 66 5 6
# calucualte the mean by group
# 1 first split the data frame into monthly pieces
s <- split(airquality, airquality$Month)
lapply(s, function(x) colMeans(x[,c("Ozone", "Solar.R", "Wind")]))
## $`5`
## Ozone Solar.R Wind
## NA NA 11.62258
##
## $`6`
## Ozone Solar.R Wind
## NA 190.16667 10.26667
##
## $`7`
## Ozone Solar.R Wind
## NA 216.483871 8.941935
##
## $`8`
## Ozone Solar.R Wind
## NA NA 8.793548
##
## $`9`
## Ozone Solar.R Wind
## NA 167.4333 10.1800
sapply(s, function(x) colMeans(x[,c("Ozone", "Solar.R", "Wind")]))
## 5 6 7 8 9
## Ozone NA NA NA NA NA
## Solar.R NA 190.16667 216.483871 NA 167.4333
## Wind 11.62258 10.26667 8.941935 8.793548 10.1800
sapply(s, function(x) colMeans(x[,c("Ozone", "Solar.R", "Wind")],na.rm=T))
## 5 6 7 8 9
## Ozone 23.61538 29.44444 59.115385 59.961538 31.44828
## Solar.R 181.29630 190.16667 216.483871 171.857143 167.43333
## Wind 11.62258 10.26667 8.941935 8.793548 10.18000
# Splitting on more than one level
x <- rnorm(10)
f1 <- gl(2,5)
f2 <- gl(5,2)
f1
## [1] 1 1 1 1 1 2 2 2 2 2
## Levels: 1 2
f2
## [1] 1 1 2 2 3 3 4 4 5 5
## Levels: 1 2 3 4 5
x
## [1] 1.024069573 0.004974036 -2.339472300 0.124157482 0.102268778
## [6] -0.189907702 -1.163785840 2.308909538 0.026116701 -0.977754778
y <-data.frame(x,f1,f2)
y
## x f1 f2
## 1 1.024069573 1 1
## 2 0.004974036 1 1
## 3 -2.339472300 1 2
## 4 0.124157482 1 2
## 5 0.102268778 1 3
## 6 -0.189907702 2 3
## 7 -1.163785840 2 4
## 8 2.308909538 2 4
## 9 0.026116701 2 5
## 10 -0.977754778 2 5
interaction(f1,f2) # interaction computes a factor which represents the interaction of the given factors
## [1] 1.1 1.1 1.2 1.2 1.3 2.3 2.4 2.4 2.5 2.5
## Levels: 1.1 2.1 1.2 2.2 1.3 2.3 1.4 2.4 1.5 2.5
# interactions can create empty levels
str(split(x,list(f1,f2))) # it will do the interaction function automatically.
## List of 10
## $ 1.1: num [1:2] 1.02407 0.00497
## $ 2.1: num(0)
## $ 1.2: num [1:2] -2.339 0.124
## $ 2.2: num(0)
## $ 1.3: num 0.102
## $ 2.3: num -0.19
## $ 1.4: num(0)
## $ 2.4: num [1:2] -1.16 2.31
## $ 1.5: num(0)
## $ 2.5: num [1:2] 0.0261 -0.9778
# Empty levels can be dropped.
str(split(x,list(f1,f2),drop=TRUE))
## List of 6
## $ 1.1: num [1:2] 1.02407 0.00497
## $ 1.2: num [1:2] -2.339 0.124
## $ 1.3: num 0.102
## $ 2.3: num -0.19
## $ 2.4: num [1:2] -1.16 2.31
## $ 2.5: num [1:2] 0.0261 -0.9778
Debugging tool built in R
indications that something’s not right * message: A generic notification/diagnostic message produced by the message function; execution of the function continues * warning an indicaiton that something is wrong but not necessarily fatal; execution of the function continues; generated by the warning funciton * error: an indication that a fatal problem has occurred; execution stops; produced by the stop funciton * condition: a generic concept for indicating that something uenexpected can occur; programmers can create their own conditions
# log(-1) an error will return
printmessage <- function(x) {
if(x>0)
print("x is greater than zero")
else
print("x is less than or equal to zero")
invisible(x) # the object returned does not get printed in console.
}
printmessage(1)
## [1] "x is greater than zero"
# printmessage(NA) an error will return because you can not make a comparision whethaet NA is greater than zero.
# how to fix it
printmessage2 <- function(x) {
if(is.na(x))
print("x is a missing value!")
else if(x>0)
print("x is greater than zero")
else
print("x is less than or equal to zero")
invisible(x)
}
printmessage2(NA)
## [1] "x is a missing value!"
How do you know that something is wrong with your function?
The primary tools for debugging funcitons in R are * traceback: prints out the function call stack after an error occurs; does nothing if there’s no erro * debug: flags a function for “debug” mode which allows you to step through execution of a function one line at a time. * browser: suspends the execution of a funtion whever it is called and puts the function in debug mode * trace: allows you to insert debugging code into a function a specific places * recover: allows you to modifi=y the error behavior so that you can browse the funciton call stack.
These are interactive tools specifically designed to allow you to pick through a funciton. There’s also the more blunt technique of inserting print/cat statements in the function.
# mean(xx) give a warning
# mean(xxx)
# traceback() # traceback give you the most recent error.
library(datasets)
data(iris)
?iris
head(iris)
## Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1 5.1 3.5 1.4 0.2 setosa
## 2 4.9 3.0 1.4 0.2 setosa
## 3 4.7 3.2 1.3 0.2 setosa
## 4 4.6 3.1 1.5 0.2 setosa
## 5 5.0 3.6 1.4 0.2 setosa
## 6 5.4 3.9 1.7 0.4 setosa
# In this dataset, what is the mean of 'Sepal.Length' for the species virginica?
tapply(iris$Sepal.Length,iris$Species,mean)
## setosa versicolor virginica
## 5.006 5.936 6.588
# Continuing with the 'iris' dataset from the previous Question, what R code returns a vector of the means of the variables 'Sepal.Length', 'Sepal.Width', 'Petal.Length', and 'Petal.Width'?
colMeans(iris[,1:4])
## Sepal.Length Sepal.Width Petal.Length Petal.Width
## 5.843333 3.057333 3.758000 1.199333
apply(iris[,1:4],2,mean)
## Sepal.Length Sepal.Width Petal.Length Petal.Width
## 5.843333 3.057333 3.758000 1.199333
library(datasets)
data(mtcars)
?mtcars
head(mtcars)
## mpg cyl disp hp drat wt qsec vs am gear carb
## Mazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4
## Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4
## Datsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1
## Hornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1
## Hornet Sportabout 18.7 8 360 175 3.15 3.440 17.02 0 0 3 2
## Valiant 18.1 6 225 105 2.76 3.460 20.22 1 0 3 1
# How can one calculate the average miles per gallon (mpg) by number of cylinders in the car (cyl)? Select all that apply.
sapply(split(mtcars$mpg, mtcars$cyl), mean)
## 4 6 8
## 26.66364 19.74286 15.10000
with(mtcars, tapply(mpg, cyl, mean))
## 4 6 8
## 26.66364 19.74286 15.10000
tapply(mtcars$mpg, mtcars$cyl, mean)
## 4 6 8
## 26.66364 19.74286 15.10000
# what is the absolute difference between the average horsepower of 4-cylinder cars and the average horsepower of 8-cylinder cars?
x<-tapply(mtcars$hp, mtcars$cyl, mean)
x
## 4 6 8
## 82.63636 122.28571 209.21429
x[1]-x[3]
## 4
## -126.5779
debug(ls)
ls()
## debugging in: ls()
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls()
## [1] "a" "above" "above10" "add2"
## [5] "age" "columnmean" "count" "cube"
## [9] "data1" "data2" "data3" "data4"
## [13] "datestring" "f" "f1" "f2"
## [17] "good" "i" "iris" "j"
## [21] "letter" "m" "make.power" "msg"
## [25] "mtcars" "myplot" "name" "noise"
## [29] "p" "printmessage" "printmessage2" "s"
## [33] "suqre" "u" "x" "y"
## [37] "z"
Example: Caching the Mean of a Vector
The first function, makeVector creates a special “vector”, which is really a list containing a function to
set the value of the vector
get the value of the vector
set the value of the mean
get the value of the mean
makeVector <- function(x = numeric()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x # since the symbol x is not defined within get(), R retrieves it from the parent environment
setmean <- function(mean) m <<- mean # the code uses the <<- form of the assignment operator to assign the input argument to the value of m in the parent environment.
getmean <- function() m
list(set = set, get = get,
setmean = setmean,
getmean = getmean)
}
makeVector(1:2)
## $set
## function(y) {
## x <<- y
## m <<- NULL
## }
## <environment: 0x11adcbc80>
##
## $get
## function() x
## <environment: 0x11adcbc80>
##
## $setmean
## function(mean) m <<- mean
## <environment: 0x11adcbc80>
##
## $getmean
## function() m
## <environment: 0x11adcbc80>
cachemean <- function(x, ...) {
m <- x$getmean()
if(!is.null(m)) {
message("getting cached data")
return(m)
}
data <- x$get()
m <- mean(data, ...)
x$setmean(m)
m
}
aVector <-makeVector(1:10)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
aVector$get()
## [1] 1 2 3 4 5 6 7 8 9 10
aVector$getmean()
## NULL
aVector$set(30:50)
cachemean(aVector)
## [1] 40
aVector$getmean()
## [1] 40
str(str)
## function (object, ...)
str(lm)
## function (formula, data, subset, weights, na.action, method = "qr", model = TRUE,
## x = FALSE, y = FALSE, qr = TRUE, singular.ok = TRUE, contrasts = NULL,
## offset, ...)
x<-rnorm(100,2,4)
str(x)
## num [1:100] 5.42 5.23 -1.51 1.72 1.77 ...
summary(x)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -6.6832 0.3383 3.0255 2.8213 5.4315 9.6969
f <- gl(40, 10)
str(f)
## Factor w/ 40 levels "1","2","3","4",..: 1 1 1 1 1 1 1 1 1 1 ...
library(datasets)
head(airquality)
## Ozone Solar.R Wind Temp Month Day
## 1 41 190 7.4 67 5 1
## 2 36 118 8.0 72 5 2
## 3 12 149 12.6 74 5 3
## 4 18 313 11.5 62 5 4
## 5 NA NA 14.3 56 5 5
## 6 28 NA 14.9 66 5 6
str(airquality)
## 'data.frame': 153 obs. of 6 variables:
## $ Ozone : int 41 36 12 18 NA 28 23 19 8 NA ...
## $ Solar.R: int 190 118 149 313 NA NA 299 99 19 194 ...
## $ Wind : num 7.4 8 12.6 11.5 14.3 14.9 8.6 13.8 20.1 8.6 ...
## $ Temp : int 67 72 74 62 56 66 65 59 61 69 ...
## $ Month : int 5 5 5 5 5 5 5 5 5 5 ...
## $ Day : int 1 2 3 4 5 6 7 8 9 10 ...
m <- matrix(rnorm(100), 10, 10)
str(m) # give you the observation in first column
## num [1:10, 1:10] 0.343 -2.262 -0.372 0.889 0.119 ...
s<-split(airquality, airquality$Month)
str(s)
## List of 5
## $ 5:'data.frame': 31 obs. of 6 variables:
## ..$ Ozone : int [1:31] 41 36 12 18 NA 28 23 19 8 NA ...
## ..$ Solar.R: int [1:31] 190 118 149 313 NA NA 299 99 19 194 ...
## ..$ Wind : num [1:31] 7.4 8 12.6 11.5 14.3 14.9 8.6 13.8 20.1 8.6 ...
## ..$ Temp : int [1:31] 67 72 74 62 56 66 65 59 61 69 ...
## ..$ Month : int [1:31] 5 5 5 5 5 5 5 5 5 5 ...
## ..$ Day : int [1:31] 1 2 3 4 5 6 7 8 9 10 ...
## $ 6:'data.frame': 30 obs. of 6 variables:
## ..$ Ozone : int [1:30] NA NA NA NA NA NA 29 NA 71 39 ...
## ..$ Solar.R: int [1:30] 286 287 242 186 220 264 127 273 291 323 ...
## ..$ Wind : num [1:30] 8.6 9.7 16.1 9.2 8.6 14.3 9.7 6.9 13.8 11.5 ...
## ..$ Temp : int [1:30] 78 74 67 84 85 79 82 87 90 87 ...
## ..$ Month : int [1:30] 6 6 6 6 6 6 6 6 6 6 ...
## ..$ Day : int [1:30] 1 2 3 4 5 6 7 8 9 10 ...
## $ 7:'data.frame': 31 obs. of 6 variables:
## ..$ Ozone : int [1:31] 135 49 32 NA 64 40 77 97 97 85 ...
## ..$ Solar.R: int [1:31] 269 248 236 101 175 314 276 267 272 175 ...
## ..$ Wind : num [1:31] 4.1 9.2 9.2 10.9 4.6 10.9 5.1 6.3 5.7 7.4 ...
## ..$ Temp : int [1:31] 84 85 81 84 83 83 88 92 92 89 ...
## ..$ Month : int [1:31] 7 7 7 7 7 7 7 7 7 7 ...
## ..$ Day : int [1:31] 1 2 3 4 5 6 7 8 9 10 ...
## $ 8:'data.frame': 31 obs. of 6 variables:
## ..$ Ozone : int [1:31] 39 9 16 78 35 66 122 89 110 NA ...
## ..$ Solar.R: int [1:31] 83 24 77 NA NA NA 255 229 207 222 ...
## ..$ Wind : num [1:31] 6.9 13.8 7.4 6.9 7.4 4.6 4 10.3 8 8.6 ...
## ..$ Temp : int [1:31] 81 81 82 86 85 87 89 90 90 92 ...
## ..$ Month : int [1:31] 8 8 8 8 8 8 8 8 8 8 ...
## ..$ Day : int [1:31] 1 2 3 4 5 6 7 8 9 10 ...
## $ 9:'data.frame': 30 obs. of 6 variables:
## ..$ Ozone : int [1:30] 96 78 73 91 47 32 20 23 21 24 ...
## ..$ Solar.R: int [1:30] 167 197 183 189 95 92 252 220 230 259 ...
## ..$ Wind : num [1:30] 6.9 5.1 2.8 4.6 7.4 15.5 10.9 10.3 10.9 9.7 ...
## ..$ Temp : int [1:30] 91 92 93 93 87 84 80 78 75 73 ...
## ..$ Month : int [1:30] 9 9 9 9 9 9 9 9 9 9 ...
## ..$ Day : int [1:30] 1 2 3 4 5 6 7 8 9 10 ...
Functions for probability distributions in R * rnorm: generate random Normal variates with a given mean and standard deviation. * dnorm: evaluate the Normal probability density (with a given mean/SD) at a point (or vector of points). * pnorm : evaluate the cumulative distribution funciton for a Normal distribution. * rpois : generate random Poisson vaariates with a given rate.
Probability distribution functions usually have four functions associated with them. The functions are preficed with a * d for density * r for random number generation * p for cumulative distribution * q for quantile function
working with the normal distributions requires using these four functions
# dnorm(x, mean=0, sd=1, log=F)
# pnorm(q, mean=0, sd=1, lower.tail =T, log.p=F)
# qnorm(q, mean=0, sd=1, lower.tail =T, log.p=F)
# rnorm(n, mean=0,sd=1)
x <-rnorm(10)
x
## [1] -0.7530543 0.3407483 -1.0839355 -0.4138759 -1.8711146 0.7096290
## [7] 0.1446385 -1.8526195 -0.4921620 1.9224461
x <- rnorm(10,20,2)
set.seed(1)
rnorm(5)
## [1] -0.6264538 0.1836433 -0.8356286 1.5952808 0.3295078
set.seed(1)
rnorm(5)
## [1] -0.6264538 0.1836433 -0.8356286 1.5952808 0.3295078
# generat Poisson data
rpois(10,1)
## [1] 0 0 1 1 2 1 1 4 1 2
rpois(10,2)
## [1] 4 1 2 0 1 1 0 1 4 1
ppois(4,2) # cummulative distribution Pr(x <=4)
## [1] 0.947347
set.seed(20)
x <- rnorm(100)
e <- rnorm(100, 0, 2)
y <- 0.5+ 2*x + e
summary(y)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -6.4084 -1.5402 0.6789 0.6893 2.9303 6.5052
plot(x,y)
what if x is binary
set.seed(10)
x <- rbinom(100, 1, 0.5)
y <- 0.5+ 2*x + e
summary(y)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## -3.07774 0.03846 1.24754 1.51949 3.21966 6.01715
plot(x,y)
Suppose we want to simulate from a Poisson model
set.seed(1)
x <- rnorm(100)
log.mu <- 0.5+0.3*x
y <- rpois(100, exp(log.mu))
summary(y)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.00 1.00 1.00 1.55 2.00 6.00
plot(x,y)
### Simulation - Random Sampling
# The sample function draws randomly from a specified set of (scalar) objects allowing you to sample from arbitrary distributions.
set.seed(1)
sample(1:10,4)
## [1] 9 4 7 1
sample(letters,5)
## [1] "b" "w" "k" "n" "r"
sample(1:10) # permutation
## [1] 3 1 5 8 2 6 10 9 4 7
sample(1:10,replace=T) # sample with replacement
## [1] 5 9 9 5 5 2 10 9 1 4
Why is my code so slow? * profiling is a systematic way to examine how much time is spend in different parts of a program * Useful when trying to optimize your code * Often code runs fine once, but what if you have to put it in a loop for 1000 iterations? Is it still fast enough? * Profiling is better than guessing.
On optimizing your code * Getting biggest impact on speeding up code depends on knowing where the code spends most of its time * This cannot be done withou performance analysis or profiling
Using system.time() * user time: time charged to the cpu for this expression * elapsed itme:” wall clock” time
system.time(readLines("http://www.jhsph.edu"))
## user system elapsed
## 0.042 0.006 0.631
The Rprof() function strarts the profiler in R * R must be compiled with profiler support ( but this is usually the case) The summaryRprof() function summarizes the output from Rprof() (otherwise its not readable) * Do not use system.teim() and Rprof() togehter or you will be sad.
*question -> input data -> features -> algorithm -> parameters -> evaluation
example: start with a general question can I automatically detect emails that are SPAM that are not make it concrete Can i use quantitative characteristics of the emails to classify them as SPAM / HAM?
question > data > features > algorithms
colleting the right data and the data is relvant to the question you are trying to answer. Often more data > better models
Properties of good features * lead to data compression * retain relevant information * are created based on expert application knowledge
Common mistakes * trying to automate feature selection * not paying attention to data-specific quirks * throwing away information unnecessarily
Algorithms matter less than you’d think
The “Best” machine Learning method * interpretable, simple, accurate, fast ( to train and test), scalable ( easy to apply to a large dataset.)
In sample error: the error rate you get on the same data set you used to build your predictor. Sometimes called resubsititution error.
Out of smaple error: the error rate you get on a new data set. sometimes called generalization error.
Key ides 1. out of smaple error is what you care about 2. in sample error < out of smaple error 3. the reason is overfitting * matching your algorithm to the data you have.
Why more sophscated alogrithm yield higher out of sample error” * overfitting + data have two parts: signal and noise * the goal of a predictor is to find signal * you can always design a perfect in-sample predictor * you capture both signal + noise when you do that * predictor won’t perform as well on new samples
if you have a lrge sample size
60% training
20% test
20% validation
if you have a medium sample size -60% training -40 % testing
*if you have a small sample size - do cross validation - report caveat of small sample size
set the test/validaiton set aside and don’t look at it all subsets should reflect as much diversity as possible -you can also try to balance by features - but this is tricky
sensitivity = tp/(tp+FN) 真得病的有多少可以测出来 recall
specificity = tn/(FP+TN) 真没病的有多少可以测出来
positive predictive value = TP/TP+FP 测出有病的有多少是真有病 precision negative predictive value = TN/FN+TN 测出没病的有多少是真没病
accuracy = (TP+TN)/(TP+FP+FN+TN) 测得有多准
For continuous data: mean squared error(MSE): calculate the average of the suqared differences between prediction and truth.
Root mean squared error (RMSE) square root of the previous A good measure of the error of the continuos data.
ROC curves
a common way to measure the quality or goodness of a prediction algorithm.
Why a curve? * in binary classification you are predicting one of two categories
but your predictions are ofoten quantitative -probability of being alive
the cutoff you choose gives different results
senstivity( recall) on the y axis (true positive rate) (1-specificity) on the x axis (false positive rate)
different point represnt different cutoff
this curve shows the tradeoff between specificity and senstivity
AUC area under the cure to compare the performace of different algothrim
if AUC =0 .5: random guessing if AUX =1 ” perfect classifer in general AUC of above 0.8 considered good
This lecture is about cross validation. Which is one of the most widely used tools, for detecting relevant features, and for building models. And estimating their parameters when doing machine learning.
Approach: 1. use the training set 2. split it into training/test sets 3. build a odel on the training set 4. evaluate on the test set 5. repeat and average the estimated errors
used for: 1. picking variables to include in a model 2. picking the tpe of prediction function to use 3. picking the parameters in the prediction function 4. compare different predictors
So, the different ways that people can use training and test sets. One example is they do random subsampling. So, imagine that, every observation we’re trying to predict is arrayed out along the, this axis here. And the color represents whether we include it in the training set or testing set, so again, this is only the training samples, and what we might do is just take a subsample of them, and call them the testing sample. So in this case, it’s the light gray bars here, are all the samples in this particular iteration that we call test samples. Then we would build our predictor on all the dark gray samples. And so, again, this is only within the training set. We take the dark gray samples and build a model, and then apply it to predict the light gray samples, and evaluate their accuracy. We can do this, for several different random subsamples. So this is a ra, one random sampling. And then this second row is the second random sampling. And this third row is the third random sampling. Do that over and over again, and then average what the errors will be.
Another way is called K-fold cross validation
another way is called leave one out cross validation
Considerations * for time series data, data must be used in “chunks” * for k-fold cross validation + larger k= less bias, more variance + smaller k = more bias, less variamce * random sampling must be done without replacement * random sampling with replacement is the bootstrap + underestimates of the erorr + can be corrected, but it is complicated
SPAM Example: Data splitting
library(caret)
## Loading required package: ggplot2
## Loading required package: lattice
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
# install.packages("kernlab")
library(kernlab);data(spam) # load the spam dataset
##
## Attaching package: 'kernlab'
## The following object is masked from 'package:ggplot2':
##
## alpha
inTrain <- createDataPartition(y=spam$type,p=0.75, list=FALSE) # split the data set in to 75% training
training <- spam[inTrain,]
testing <- spam[-inTrain,]
dim(training)
## [1] 3451 58
SPAM Example: Fit a model
set.seed(32343)
modelFit <- train(type~., data=training, method="glm")
## debugging in: ls(env, pattern = p, all.names = TRUE)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## debug: grep(pattern, all.names, value = TRUE)
## exiting from: ls(env, pattern = p, all.names = TRUE)
## debugging in: ls(env, pattern = p, all.names = TRUE)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## debug: grep(pattern, all.names, value = TRUE)
## exiting from: ls(env, pattern = p, all.names = TRUE)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
modelFit
## Generalized Linear Model
##
## 3451 samples
## 57 predictor
## 2 classes: 'nonspam', 'spam'
##
## No pre-processing
## Resampling: Bootstrapped (25 reps)
## Summary of sample sizes: 3451, 3451, 3451, 3451, 3451, 3451, ...
## Resampling results:
##
## Accuracy Kappa
## 0.9225736 0.8371828
modelFit$finalModel # get the details of the fitted model parameter.
##
## Call: NULL
##
## Coefficients:
## (Intercept) make address all
## -1.620e+00 -5.885e-01 -1.190e-01 1.661e-01
## num3d our over remove
## 2.636e+00 5.691e-01 7.279e-01 2.458e+00
## internet order mail receive
## 6.518e-01 1.059e+00 9.496e-02 -7.488e-02
## will people report addresses
## -8.175e-02 -4.441e-02 6.955e-02 1.712e+00
## free business email you
## 9.414e-01 1.443e+00 9.566e-02 6.401e-02
## credit your font num000
## 1.407e+00 2.144e-01 2.940e-01 1.837e+00
## money hp hpl george
## 6.259e-01 -2.089e+00 -8.787e-01 -1.129e+01
## num650 lab labs telnet
## 4.358e-01 -4.073e+00 -2.792e-01 -1.282e-01
## num857 data num415 num85
## 2.261e+00 -7.452e-01 5.336e-01 -1.852e+00
## technology num1999 parts pm
## 1.245e+00 -2.546e-02 9.555e-01 -1.011e+00
## direct cs meeting original
## -2.261e-01 -5.235e+02 -2.362e+00 -1.907e+00
## project re edu table
## -1.599e+00 -5.858e-01 -1.619e+00 -2.120e+00
## conference charSemicolon charRoundbracket charSquarebracket
## -3.425e+00 -1.508e+00 -4.612e-01 -8.961e-01
## charExclamation charDollar charHash capitalAve
## 6.385e-01 5.002e+00 2.195e+00 6.768e-03
## capitalLong capitalTotal
## 9.550e-03 6.548e-04
##
## Degrees of Freedom: 3450 Total (i.e. Null); 3393 Residual
## Null Deviance: 4628
## Residual Deviance: 1336 AIC: 1452
predictions <- predict(modelFit, newdata=testing)
predictions
## [1] spam spam spam spam spam spam spam spam nonspam
## [10] spam spam spam spam spam spam spam spam spam
## [19] spam spam spam spam spam spam spam nonspam spam
## [28] nonspam spam spam spam spam spam spam spam spam
## [37] spam spam spam spam spam spam spam spam spam
## [46] spam spam spam nonspam spam spam spam spam spam
## [55] spam spam spam spam spam nonspam spam spam spam
## [64] spam spam spam spam spam spam spam spam spam
## [73] spam spam spam spam spam spam nonspam spam spam
## [82] nonspam spam spam spam spam spam spam spam spam
## [91] spam spam spam spam spam spam spam nonspam spam
## [100] spam spam spam spam spam spam spam spam spam
## [109] spam spam spam nonspam spam spam spam spam spam
## [118] nonspam spam nonspam nonspam spam nonspam spam spam spam
## [127] spam spam spam spam spam spam spam spam spam
## [136] spam spam spam spam nonspam spam spam spam spam
## [145] nonspam spam spam spam spam spam nonspam spam spam
## [154] spam spam spam spam spam spam spam spam spam
## [163] spam spam nonspam spam spam spam spam spam spam
## [172] spam nonspam spam spam spam spam spam spam spam
## [181] spam spam spam spam spam spam spam spam spam
## [190] spam spam spam spam spam spam spam spam spam
## [199] spam spam spam spam spam spam spam spam spam
## [208] spam spam spam spam spam spam spam nonspam spam
## [217] spam spam spam spam spam spam spam spam spam
## [226] spam spam spam nonspam spam nonspam nonspam spam spam
## [235] spam spam spam spam spam spam spam spam spam
## [244] spam spam spam spam spam spam spam spam spam
## [253] spam spam nonspam spam spam spam spam spam spam
## [262] spam spam spam spam spam spam spam spam spam
## [271] spam spam spam spam spam spam spam spam spam
## [280] spam spam spam spam spam spam spam spam spam
## [289] spam spam spam spam spam spam spam spam spam
## [298] spam spam spam spam spam spam spam spam spam
## [307] spam nonspam spam spam spam spam spam spam spam
## [316] spam spam spam spam spam spam spam spam spam
## [325] spam nonspam spam spam spam spam spam spam spam
## [334] nonspam nonspam nonspam spam spam spam nonspam spam spam
## [343] spam spam spam spam spam spam spam spam spam
## [352] nonspam spam spam nonspam nonspam spam spam spam spam
## [361] spam spam spam nonspam spam spam spam spam spam
## [370] spam spam spam spam nonspam spam spam spam spam
## [379] spam spam spam spam spam spam spam spam nonspam
## [388] spam nonspam spam nonspam spam spam spam spam spam
## [397] nonspam nonspam spam spam spam spam spam spam spam
## [406] spam spam spam spam nonspam spam spam spam spam
## [415] nonspam spam spam spam nonspam nonspam spam spam spam
## [424] spam spam spam nonspam spam spam nonspam spam spam
## [433] spam spam spam spam spam spam nonspam spam spam
## [442] spam spam spam spam nonspam spam spam spam spam
## [451] nonspam spam spam spam nonspam nonspam nonspam nonspam nonspam
## [460] nonspam nonspam spam nonspam nonspam nonspam nonspam nonspam nonspam
## [469] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [478] nonspam nonspam spam nonspam nonspam nonspam nonspam nonspam nonspam
## [487] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [496] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [505] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [514] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [523] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [532] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [541] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [550] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [559] nonspam spam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [568] nonspam nonspam nonspam nonspam nonspam nonspam nonspam spam nonspam
## [577] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [586] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [595] nonspam spam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [604] nonspam nonspam nonspam nonspam nonspam nonspam spam nonspam nonspam
## [613] nonspam nonspam nonspam nonspam nonspam nonspam spam nonspam nonspam
## [622] nonspam nonspam nonspam nonspam nonspam nonspam spam nonspam nonspam
## [631] nonspam nonspam nonspam nonspam nonspam spam nonspam nonspam nonspam
## [640] spam nonspam nonspam nonspam spam nonspam nonspam nonspam nonspam
## [649] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [658] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam spam
## [667] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [676] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [685] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [694] nonspam nonspam nonspam nonspam nonspam nonspam nonspam spam nonspam
## [703] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [712] nonspam nonspam nonspam nonspam nonspam spam nonspam nonspam nonspam
## [721] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [730] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [739] nonspam spam nonspam nonspam nonspam nonspam nonspam nonspam spam
## [748] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [757] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [766] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [775] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [784] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [793] nonspam nonspam nonspam nonspam nonspam nonspam nonspam spam nonspam
## [802] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [811] nonspam nonspam spam nonspam nonspam nonspam nonspam nonspam nonspam
## [820] nonspam nonspam nonspam nonspam nonspam nonspam spam nonspam nonspam
## [829] spam nonspam nonspam spam spam nonspam nonspam nonspam nonspam
## [838] nonspam nonspam nonspam nonspam spam nonspam nonspam nonspam nonspam
## [847] nonspam nonspam nonspam nonspam spam nonspam nonspam nonspam nonspam
## [856] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [865] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [874] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [883] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [892] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [901] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [910] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [919] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [928] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [937] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [946] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [955] nonspam nonspam nonspam spam nonspam nonspam nonspam nonspam nonspam
## [964] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [973] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [982] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [991] nonspam nonspam nonspam nonspam nonspam spam nonspam nonspam nonspam
## [1000] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [1009] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [1018] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [1027] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [1036] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [1045] nonspam spam nonspam nonspam nonspam nonspam nonspam nonspam spam
## [1054] spam nonspam nonspam spam nonspam nonspam nonspam nonspam nonspam
## [1063] spam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [1072] nonspam nonspam nonspam spam nonspam nonspam nonspam nonspam nonspam
## [1081] nonspam nonspam nonspam spam nonspam nonspam nonspam nonspam nonspam
## [1090] nonspam spam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [1099] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [1108] nonspam nonspam nonspam nonspam spam nonspam nonspam nonspam nonspam
## [1117] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [1126] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [1135] nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## [1144] nonspam nonspam nonspam nonspam nonspam nonspam nonspam
## Levels: nonspam spam
SPAM Example: Confusion Matrix
check the model preformance
# confusionMatrix(predicitons, testing$type)
SPAM Example: Data splitting
Use createDataPartition to separate training set and test set.
library(caret)
library(kernlab);data(spam) # load the spam dataset
# create an indicator function.
inTrain <- createDataPartition(y=spam$type,p=0.75, list=FALSE) # split the data set in to 75% training
training <- spam[inTrain,]
testing <- spam[-inTrain,]
dim(training)
## [1] 3451 58
SPAM Example: K-fold of the training set
set.seed(32323)
folds <- createFolds(y=spam$type, k=10, list=T, returnTrain=T)
sapply(folds, length)
## Fold01 Fold02 Fold03 Fold04 Fold05 Fold06 Fold07 Fold08 Fold09 Fold10
## 4140 4142 4141 4140 4141 4141 4142 4141 4141 4140
folds[[1]][1:10]
## [1] 1 2 4 5 6 7 8 9 10 11
table(unlist(folds)) # each observation to be used in 9 of the folds.
##
## 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 3452 3453 3454 3455 3456
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3457 3458 3459 3460 3461 3462 3463 3464 3465 3466 3467 3468 3469 3470 3471 3472
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3473 3474 3475 3476 3477 3478 3479 3480 3481 3482 3483 3484 3485 3486 3487 3488
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3489 3490 3491 3492 3493 3494 3495 3496 3497 3498 3499 3500 3501 3502 3503 3504
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3505 3506 3507 3508 3509 3510 3511 3512 3513 3514 3515 3516 3517 3518 3519 3520
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3521 3522 3523 3524 3525 3526 3527 3528 3529 3530 3531 3532 3533 3534 3535 3536
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3537 3538 3539 3540 3541 3542 3543 3544 3545 3546 3547 3548 3549 3550 3551 3552
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3553 3554 3555 3556 3557 3558 3559 3560 3561 3562 3563 3564 3565 3566 3567 3568
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3569 3570 3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3681 3682 3683 3684 3685 3686 3687 3688 3689 3690 3691 3692 3693 3694 3695 3696
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3697 3698 3699 3700 3701 3702 3703 3704 3705 3706 3707 3708 3709 3710 3711 3712
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3713 3714 3715 3716 3717 3718 3719 3720 3721 3722 3723 3724 3725 3726 3727 3728
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3729 3730 3731 3732 3733 3734 3735 3736 3737 3738 3739 3740 3741 3742 3743 3744
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3777 3778 3779 3780 3781 3782 3783 3784 3785 3786 3787 3788 3789 3790 3791 3792
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3793 3794 3795 3796 3797 3798 3799 3800 3801 3802 3803 3804 3805 3806 3807 3808
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3809 3810 3811 3812 3813 3814 3815 3816 3817 3818 3819 3820 3821 3822 3823 3824
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3825 3826 3827 3828 3829 3830 3831 3832 3833 3834 3835 3836 3837 3838 3839 3840
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3841 3842 3843 3844 3845 3846 3847 3848 3849 3850 3851 3852 3853 3854 3855 3856
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3857 3858 3859 3860 3861 3862 3863 3864 3865 3866 3867 3868 3869 3870 3871 3872
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3873 3874 3875 3876 3877 3878 3879 3880 3881 3882 3883 3884 3885 3886 3887 3888
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3889 3890 3891 3892 3893 3894 3895 3896 3897 3898 3899 3900 3901 3902 3903 3904
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3905 3906 3907 3908 3909 3910 3911 3912 3913 3914 3915 3916 3917 3918 3919 3920
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3921 3922 3923 3924 3925 3926 3927 3928 3929 3930 3931 3932 3933 3934 3935 3936
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3937 3938 3939 3940 3941 3942 3943 3944 3945 3946 3947 3948 3949 3950 3951 3952
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3953 3954 3955 3956 3957 3958 3959 3960 3961 3962 3963 3964 3965 3966 3967 3968
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3969 3970 3971 3972 3973 3974 3975 3976 3977 3978 3979 3980 3981 3982 3983 3984
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 3985 3986 3987 3988 3989 3990 3991 3992 3993 3994 3995 3996 3997 3998 3999 4000
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4049 4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4129 4130 4131 4132 4133 4134 4135 4136 4137 4138 4139 4140 4141 4142 4143 4144
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 4222 4223 4224
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4273 4274 4275 4276 4277 4278 4279 4280 4281 4282 4283 4284 4285 4286 4287 4288
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4289 4290 4291 4292 4293 4294 4295 4296 4297 4298 4299 4300 4301 4302 4303 4304
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4305 4306 4307 4308 4309 4310 4311 4312 4313 4314 4315 4316 4317 4318 4319 4320
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4321 4322 4323 4324 4325 4326 4327 4328 4329 4330 4331 4332 4333 4334 4335 4336
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4337 4338 4339 4340 4341 4342 4343 4344 4345 4346 4347 4348 4349 4350 4351 4352
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4353 4354 4355 4356 4357 4358 4359 4360 4361 4362 4363 4364 4365 4366 4367 4368
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4369 4370 4371 4372 4373 4374 4375 4376 4377 4378 4379 4380 4381 4382 4383 4384
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4385 4386 4387 4388 4389 4390 4391 4392 4393 4394 4395 4396 4397 4398 4399 4400
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4401 4402 4403 4404 4405 4406 4407 4408 4409 4410 4411 4412 4413 4414 4415 4416
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4417 4418 4419 4420 4421 4422 4423 4424 4425 4426 4427 4428 4429 4430 4431 4432
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4433 4434 4435 4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 4462 4463 4464
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4481 4482 4483 4484 4485 4486 4487 4488 4489 4490 4491 4492 4493 4494 4495 4496
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4497 4498 4499 4500 4501 4502 4503 4504 4505 4506 4507 4508 4509 4510 4511 4512
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4513 4514 4515 4516 4517 4518 4519 4520 4521 4522 4523 4524 4525 4526 4527 4528
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4529 4530 4531 4532 4533 4534 4535 4536 4537 4538 4539 4540 4541 4542 4543 4544
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4545 4546 4547 4548 4549 4550 4551 4552 4553 4554 4555 4556 4557 4558 4559 4560
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4561 4562 4563 4564 4565 4566 4567 4568 4569 4570 4571 4572 4573 4574 4575 4576
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4577 4578 4579 4580 4581 4582 4583 4584 4585 4586 4587 4588 4589 4590 4591 4592
## 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9
## 4593 4594 4595 4596 4597 4598 4599 4600 4601
## 9 9 9 9 9 9 9 9 9
# returntraina: logical. When true, the values returned are the sample positions corresponding to the data used during training. This argument only works in conjunction with list = TRUE
SPAM Example: Return test
set.seed(32323)
folds <- createFolds(y=spam$type, k=10, list=T, returnTrain=F)
sapply(folds, length)
## Fold01 Fold02 Fold03 Fold04 Fold05 Fold06 Fold07 Fold08 Fold09 Fold10
## 461 459 460 461 460 460 459 460 460 461
folds[[1]][1:10]
## [1] 3 19 33 38 44 51 66 67 72 83
# if return Train is fals, then it would be ten folds for the test set.
SPAM Example: Resampling
set.seed(32323)
folds <- createResample(y=spam$type, times=10,list=T)
sapply(folds, length)
## Resample01 Resample02 Resample03 Resample04 Resample05 Resample06 Resample07
## 4601 4601 4601 4601 4601 4601 4601
## Resample08 Resample09 Resample10
## 4601 4601 4601
folds[[1]][1:10]
## [1] 1 1 2 2 3 3 4 5 5 7
# sampling with replacement.
SPAM Example: Time slices
set.seed(32323)
tme <- 1:1000
folds <- createTimeSlices(y=tme, initialWindow = 20 , horizon=10)
names(folds)
## [1] "train" "test"
folds$train[[1]]
## [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
folds$test[[1]]
## [1] 21 22 23 24 25 26 27 28 29 30
library(caret)
library(kernlab);data(spam) # load the spam dataset
# create an indicator function.
inTrain <- createDataPartition(y=spam$type,p=0.75, list=FALSE) # split the data set in to 75% training
training <- spam[inTrain,]
testing <- spam[-inTrain,]
dim(training)
## [1] 3451 58
modelFit <- train(type~., data=training, method="glm")
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
modelFit
## Generalized Linear Model
##
## 3451 samples
## 57 predictor
## 2 classes: 'nonspam', 'spam'
##
## No pre-processing
## Resampling: Bootstrapped (25 reps)
## Summary of sample sizes: 3451, 3451, 3451, 3451, 3451, 3451, ...
## Resampling results:
##
## Accuracy Kappa
## 0.9241196 0.8395629
# install.packages("ISLR")
library(ISLR)
## debugging in: ls(env, pattern = p, all.names = TRUE)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## debug: grep(pattern, all.names, value = TRUE)
## exiting from: ls(env, pattern = p, all.names = TRUE)
library(ggplot2)
library(caret)
data(Wage)
summary(Wage)
## year age maritl race
## Min. :2003 Min. :18.00 1. Never Married: 648 1. White:2480
## 1st Qu.:2004 1st Qu.:33.75 2. Married :2074 2. Black: 293
## Median :2006 Median :42.00 3. Widowed : 19 3. Asian: 190
## Mean :2006 Mean :42.41 4. Divorced : 204 4. Other: 37
## 3rd Qu.:2008 3rd Qu.:51.00 5. Separated : 55
## Max. :2009 Max. :80.00
##
## education region jobclass
## 1. < HS Grad :268 2. Middle Atlantic :3000 1. Industrial :1544
## 2. HS Grad :971 1. New England : 0 2. Information:1456
## 3. Some College :650 3. East North Central: 0
## 4. College Grad :685 4. West North Central: 0
## 5. Advanced Degree:426 5. South Atlantic : 0
## 6. East South Central: 0
## (Other) : 0
## health health_ins logwage wage
## 1. <=Good : 858 1. Yes:2083 Min. :3.000 Min. : 20.09
## 2. >=Very Good:2142 2. No : 917 1st Qu.:4.447 1st Qu.: 85.38
## Median :4.653 Median :104.92
## Mean :4.654 Mean :111.70
## 3rd Qu.:4.857 3rd Qu.:128.68
## Max. :5.763 Max. :318.34
##
# get training/test sets
inTrain <- createDataPartition(y=Wage$wage, p=0.7, list=F)
training <- Wage[inTrain,]
testing <- Wage[-inTrain,]
dim(training);
## [1] 2102 11
dim(testing)
## [1] 898 11
# feature plot( caret package )
featurePlot(x=training[,c("age","education","jobclass")],
y=training$wage,
plot="pairs")
# Qplot (ggplot2 package)
qplot(age,wage,data=training)
# Qplot with color (ggplot2 package)
qplot(age,wage,colour=jobclass, data=training)
# add regression smoothers (ggplot2 package)
qq <- qplot(age, wage, colour=education, data=training)
qq + geom_smooth(method='lm', formula=y~x)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
# cut2, makin factors (Hmisc package)
# install.packages("Hmisc")
# change wage variable into different category
library(Hmisc)
## Loading required package: survival
##
## Attaching package: 'survival'
## The following object is masked from 'package:caret':
##
## cluster
## Loading required package: Formula
## debugging in: ls(env, pattern = p, all.names = TRUE)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## debug: grep(pattern, all.names, value = TRUE)
## exiting from: ls(env, pattern = p, all.names = TRUE)
## debugging in: ls(env, pattern = p, all.names = TRUE)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## debug: grep(pattern, all.names, value = TRUE)
## exiting from: ls(env, pattern = p, all.names = TRUE)
## debugging in: ls(env, pattern = p, all.names = TRUE)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## debug: grep(pattern, all.names, value = TRUE)
## exiting from: ls(env, pattern = p, all.names = TRUE)
##
## Attaching package: 'Hmisc'
## The following objects are masked from 'package:dplyr':
##
## src, summarize
## The following objects are masked from 'package:base':
##
## format.pval, units
cutWage <- cut2(training$wage, g=3)
table(cutWage)
## cutWage
## [ 20.1, 91.7) [ 91.7,118.9) [118.9,318.3]
## 701 728 673
p1 <- qplot(cutWage, age, data=training, fill=cutWage, geom=c("boxplot"))
p1
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
# Boxplots with points overlayed
p2 <- qplot(cutWage, age, data=training, fill=cutWage,geom=c("boxplot","jitter"))
# put two picures together.
# grid.arrange(p1,p2,ncol=2)
# Tables
t1 <- table(cutWage,training$jobclass)
t1
##
## cutWage 1. Industrial 2. Information
## [ 20.1, 91.7) 442 259
## [ 91.7,118.9) 370 358
## [118.9,318.3] 254 419
prop.table(t1,1) # proportion
##
## cutWage 1. Industrial 2. Information
## [ 20.1, 91.7) 0.6305278 0.3694722
## [ 91.7,118.9) 0.5082418 0.4917582
## [118.9,318.3] 0.3774146 0.6225854
# Density plots
qplot(wage, colour=education, data=training, geom="density")
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
Notes: * Make your plots only in the training set + Don’t use the test set for exploration! * Things you should be looking for + imbalance in outcomes/predictors + outliers + groups of points not explained by a predictor + skewed variables
library(caret)
library(kernlab);data(spam) # load the spam dataset
# create an indicator function.
inTrain <- createDataPartition(y=spam$type,p=0.75, list=FALSE) # split the data set in to 75% training
training <- spam[inTrain,]
testing <- spam[-inTrain,]
hist(training$capitalAve, main="", xlab="ave. capital run length")
mean(training$capitalAve)
## [1] 5.452347
sd(training$capitalAve)
## [1] 32.04618
# we found that variable is skewed and highly variable
# standardizing
trainCapAve <- training$capitalAve
trainCapAveS <- (trainCapAve - mean(trainCapAve))/sd(trainCapAve)
mean(trainCapAveS)
## [1] 3.3215e-16
sd(trainCapAveS)
## [1] 1
# standardizing -test
testCapAve <- testing$capitalAve
testCapAveS <-(testCapAve - mean(trainCapAve))/sd(trainCapAve)
mean(testCapAveS)
## [1] -0.0325641
sd(testCapAveS)
## [1] 0.9598581
# standardizing - preProcess function (built in caret)
preObj <- preProcess(training[,-58], method = c("center","scale")) # center every variable and scale every variable except for the outcome variable
trainCapAveS <- predict(preObj, training[,-58])$capitalAve
mean(trainCapAveS)
## [1] 3.3215e-16
sd(trainCapAveS)
## [1] 1
# apply the same preproces to the testset!
testCapAveS <- predict(preObj, testing[,-58])$capitalAve
mean(testCapAveS)
## [1] -0.0325641
sd(testCapAveS)
## [1] 0.9598581
# you can pas the preProcess in the train as an argument
modelFit <- train(type~., data=training, preProcess=c("center","scale"), method="glm")
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
modelFit
## Generalized Linear Model
##
## 3451 samples
## 57 predictor
## 2 classes: 'nonspam', 'spam'
##
## Pre-processing: centered (57), scaled (57)
## Resampling: Bootstrapped (25 reps)
## Summary of sample sizes: 3451, 3451, 3451, 3451, 3451, 3451, ...
## Resampling results:
##
## Accuracy Kappa
## 0.9194936 0.8308233
# another way to standare variable
# standardizing - Box-Cox transforms
preObj <- preProcess(training[,-58], method=c("BoxCox"))
trainCapAveS <- predict(preObj, training[,-58])$capitalAve
par(mfrow=c(1,2));
hist(trainCapAveS); qqnorm(trainCapAveS)
# fill the missing data.
set.seed(13343)
# make some values NA
training$capAve <- training$capitalAve
selectNA <- rbinom(dim(training)[1], size=1,prob=0.05)==1
training$capAve[selectNA]<-NA
# impute and Standardize
# install.packages("RANN")
library(RANN)
preObj <- preProcess(training[,-58], method="knnImpute")
capAve <-predict(preObj, training[,-58])$capAve
# Standardize true values
capAveTruth <- training$capitalAve
capAveTruth <- (capAveTruth-mean(capAveTruth))/sd(capAveTruth)
quantile(capAve-capAveTruth) # compare imputed and actual
## 0% 25% 50% 75% 100%
## -1.522799841 0.001799650 0.002202549 0.002389961 0.708600118
Notes and further reading
Training and test must be preocssed in the same way test transformations will likely be imperfect + especially if the test/training sets collected at different times careful when transforming factor variables*
Two levels of covariate creation
# Load example data
library(ISLR); library(caret); data(Wage);
inTrain <- createDataPartition(y=Wage$wage, p=0.7, list=F)
training <- Wage[inTrain,]; testing <- Wage[-inTrain,]
# Common covariates to add, dummy variables
table(training$jobclass)
##
## 1. Industrial 2. Information
## 1069 1033
# convert factor variables to indicator variables
dummies <- dummyVars(wage ~ jobclass, data=training)
head(predict(dummies, newdata=training))
## jobclass.1. Industrial jobclass.2. Information
## 231655 1 0
## 86582 0 1
## 161300 1 0
## 155159 0 1
## 376662 0 1
## 450601 1 0
# Removing zero covariates (some variable, no variablility)
nsv <- nearZeroVar(training, saveMetrics = T)
nsv
## freqRatio percentUnique zeroVar nzv
## year 1.034384 0.33301618 FALSE FALSE
## age 1.116883 2.90199810 FALSE FALSE
## maritl 3.374713 0.23786870 FALSE FALSE
## race 8.146226 0.19029496 FALSE FALSE
## education 1.438525 0.23786870 FALSE FALSE
## region 0.000000 0.04757374 TRUE TRUE
## jobclass 1.034850 0.09514748 FALSE FALSE
## health 2.480132 0.09514748 FALSE FALSE
## health_ins 2.199391 0.09514748 FALSE FALSE
## logwage 1.133333 19.12464320 FALSE FALSE
## wage 1.133333 19.12464320 FALSE FALSE
# So this is a nice way to throw those sort of less meaningful predictors out right away.
Spline basis
# install.packages("splines")
library(splines)
bsBasis <- bs(training$age, df=3)
bsBasis
## 1 2 3
## [1,] 0.000000000 0.0000000000 0.000000e+00
## [2,] 0.236850055 0.0253767916 9.063140e-04
## [3,] 0.416337988 0.3211750193 8.258786e-02
## [4,] 0.430813836 0.2910904300 6.556091e-02
## [5,] 0.306334128 0.4241549461 1.957638e-01
## [6,] 0.424154946 0.3063341278 7.374710e-02
## [7,] 0.377630828 0.0906313987 7.250512e-03
## [8,] 0.440355309 0.2596967205 5.105149e-02
## [9,] 0.335537578 0.4074384881 1.649156e-01
## [10,] 0.416337988 0.3211750193 8.258786e-02
## [11,] 0.433331375 0.1637029640 2.061445e-02
## [12,] 0.444358195 0.2275981001 3.885821e-02
## [13,] 0.306334128 0.4241549461 1.957638e-01
## [14,] 0.442218287 0.1953987782 2.877966e-02
## [15,] 0.275519452 0.4362391326 2.302373e-01
## [16,] 0.444093854 0.2114732637 3.356718e-02
## [17,] 0.443086838 0.2436977611 4.467792e-02
## [18,] 0.443086838 0.2436977611 4.467792e-02
## [19,] 0.444093854 0.2114732637 3.356718e-02
## [20,] 0.375000000 0.3750000000 1.250000e-01
## [21,] 0.430813836 0.2910904300 6.556091e-02
## [22,] 0.426168977 0.1482326877 1.718640e-02
## [23,] 0.259696720 0.4403553087 2.488965e-01
## [24,] 0.000000000 0.0000000000 0.000000e+00
## [25,] 0.291090430 0.4308138364 2.125348e-01
## [26,] 0.417093250 0.1331148669 1.416116e-02
## [27,] 0.438655970 0.1794501695 2.447048e-02
## [28,] 0.275519452 0.4362391326 2.302373e-01
## [29,] 0.065456010 0.3403712531 5.899768e-01
## [30,] 0.266544426 0.0339238361 1.439193e-03
## [31,] 0.406028666 0.1184250277 1.151354e-02
## [32,] 0.430813836 0.2910904300 6.556091e-02
## [33,] 0.444358195 0.2275981001 3.885821e-02
## [34,] 0.335537578 0.4074384881 1.649156e-01
## [35,] 0.266544426 0.0339238361 1.439193e-03
## [36,] 0.417093250 0.1331148669 1.416116e-02
## [37,] 0.259696720 0.4403553087 2.488965e-01
## [38,] 0.054038972 0.3182294988 6.246727e-01
## [39,] 0.204487093 0.0179374643 5.244873e-04
## [40,] 0.377630828 0.0906313987 7.250512e-03
## [41,] 0.169380014 0.0116813803 2.685375e-04
## [42,] 0.227598100 0.4443581954 2.891855e-01
## [43,] 0.340371253 0.0654560102 4.195898e-03
## [44,] 0.195398778 0.4422182874 3.336033e-01
## [45,] 0.426168977 0.1482326877 1.718640e-02
## [46,] 0.430813836 0.2910904300 6.556091e-02
## [47,] 0.306334128 0.4241549461 1.957638e-01
## [48,] 0.386693968 0.3625255950 1.132892e-01
## [49,] 0.375000000 0.3750000000 1.250000e-01
## [50,] 0.436239133 0.2755194522 5.800410e-02
## [51,] 0.291090430 0.4308138364 2.125348e-01
## [52,] 0.131453291 0.0066840657 1.132892e-04
## [53,] 0.243697761 0.4430868383 2.685375e-01
## [54,] 0.392899701 0.1042386963 9.218388e-03
## [55,] 0.266544426 0.0339238361 1.439193e-03
## [56,] 0.406028666 0.1184250277 1.151354e-02
## [57,] 0.424154946 0.3063341278 7.374710e-02
## [58,] 0.211473264 0.4440938538 3.108657e-01
## [59,] 0.424154946 0.3063341278 7.374710e-02
## [60,] 0.291090430 0.4308138364 2.125348e-01
## [61,] 0.266544426 0.0339238361 1.439193e-03
## [62,] 0.321175019 0.4163379880 1.798991e-01
## [63,] 0.065456010 0.3403712531 5.899768e-01
## [64,] 0.397531973 0.3493462791 1.023338e-01
## [65,] 0.426168977 0.1482326877 1.718640e-02
## [66,] 0.169380014 0.0116813803 2.685375e-04
## [67,] 0.416337988 0.3211750193 8.258786e-02
## [68,] 0.430813836 0.2910904300 6.556091e-02
## [69,] 0.417093250 0.1331148669 1.416116e-02
## [70,] 0.179450170 0.4386559699 3.574234e-01
## [71,] 0.442218287 0.1953987782 2.877966e-02
## [72,] 0.362525595 0.3866939680 1.374912e-01
## [73,] 0.440355309 0.2596967205 5.105149e-02
## [74,] 0.444093854 0.2114732637 3.356718e-02
## [75,] 0.433331375 0.1637029640 2.061445e-02
## [76,] 0.360146521 0.0776786613 5.584740e-03
## [77,] 0.444358195 0.2275981001 3.885821e-02
## [78,] 0.291090430 0.4308138364 2.125348e-01
## [79,] 0.444093854 0.2114732637 3.356718e-02
## [80,] 0.375000000 0.3750000000 1.250000e-01
## [81,] 0.436239133 0.2755194522 5.800410e-02
## [82,] 0.430813836 0.2910904300 6.556091e-02
## [83,] 0.444093854 0.2114732637 3.356718e-02
## [84,] 0.259696720 0.4403553087 2.488965e-01
## [85,] 0.266544426 0.0339238361 1.439193e-03
## [86,] 0.375000000 0.3750000000 1.250000e-01
## [87,] 0.440355309 0.2596967205 5.105149e-02
## [88,] 0.375000000 0.3750000000 1.250000e-01
## [89,] 0.335537578 0.4074384881 1.649156e-01
## [90,] 0.430813836 0.2910904300 6.556091e-02
## [91,] 0.211473264 0.4440938538 3.108657e-01
## [92,] 0.407438488 0.3355375785 9.210835e-02
## [93,] 0.131453291 0.0066840657 1.132892e-04
## [94,] 0.195398778 0.4422182874 3.336033e-01
## [95,] 0.406028666 0.1184250277 1.151354e-02
## [96,] 0.293645732 0.0435030714 2.148300e-03
## [97,] 0.406028666 0.1184250277 1.151354e-02
## [98,] 0.442218287 0.1953987782 2.877966e-02
## [99,] 0.169380014 0.0116813803 2.685375e-04
## [100,] 0.424154946 0.3063341278 7.374710e-02
## [101,] 0.433331375 0.1637029640 2.061445e-02
## [102,] 0.443086838 0.2436977611 4.467792e-02
## [103,] 0.433331375 0.1637029640 2.061445e-02
## [104,] 0.433331375 0.1637029640 2.061445e-02
## [105,] 0.430813836 0.2910904300 6.556091e-02
## [106,] 0.417093250 0.1331148669 1.416116e-02
## [107,] 0.211473264 0.4440938538 3.108657e-01
## [108,] 0.444093854 0.2114732637 3.356718e-02
## [109,] 0.321175019 0.4163379880 1.798991e-01
## [110,] 0.259696720 0.4403553087 2.488965e-01
## [111,] 0.148232688 0.4261689772 4.084119e-01
## [112,] 0.433331375 0.1637029640 2.061445e-02
## [113,] 0.306334128 0.4241549461 1.957638e-01
## [114,] 0.416337988 0.3211750193 8.258786e-02
## [115,] 0.386693968 0.3625255950 1.132892e-01
## [116,] 0.407438488 0.3355375785 9.210835e-02
## [117,] 0.291090430 0.4308138364 2.125348e-01
## [118,] 0.375000000 0.3750000000 1.250000e-01
## [119,] 0.426168977 0.1482326877 1.718640e-02
## [120,] 0.443086838 0.2436977611 4.467792e-02
## [121,] 0.442218287 0.1953987782 2.877966e-02
## [122,] 0.444358195 0.2275981001 3.885821e-02
## [123,] 0.335537578 0.4074384881 1.649156e-01
## [124,] 0.362525595 0.3866939680 1.374912e-01
## [125,] 0.397531973 0.3493462791 1.023338e-01
## [126,] 0.318229499 0.0540389715 3.058810e-03
## [127,] 0.424154946 0.3063341278 7.374710e-02
## [128,] 0.442218287 0.1953987782 2.877966e-02
## [129,] 0.335537578 0.4074384881 1.649156e-01
## [130,] 0.444358195 0.2275981001 3.885821e-02
## [131,] 0.392899701 0.1042386963 9.218388e-03
## [132,] 0.243697761 0.4430868383 2.685375e-01
## [133,] 0.377630828 0.0906313987 7.250512e-03
## [134,] 0.318229499 0.0540389715 3.058810e-03
## [135,] 0.433331375 0.1637029640 2.061445e-02
## [136,] 0.386693968 0.3625255950 1.132892e-01
## [137,] 0.360146521 0.0776786613 5.584740e-03
## [138,] 0.266544426 0.0339238361 1.439193e-03
## [139,] 0.443086838 0.2436977611 4.467792e-02
## [140,] 0.318229499 0.0540389715 3.058810e-03
## [141,] 0.375000000 0.3750000000 1.250000e-01
## [142,] 0.169380014 0.0116813803 2.685375e-04
## [143,] 0.416337988 0.3211750193 8.258786e-02
## [144,] 0.163702964 0.4333313752 3.823512e-01
## [145,] 0.375000000 0.3750000000 1.250000e-01
## [146,] 0.266544426 0.0339238361 1.439193e-03
## [147,] 0.360146521 0.0776786613 5.584740e-03
## [148,] 0.442218287 0.1953987782 2.877966e-02
## [149,] 0.433331375 0.1637029640 2.061445e-02
## [150,] 0.407438488 0.3355375785 9.210835e-02
## [151,] 0.243697761 0.4430868383 2.685375e-01
## [152,] 0.444358195 0.2275981001 3.885821e-02
## [153,] 0.442218287 0.1953987782 2.877966e-02
## [154,] 0.318229499 0.0540389715 3.058810e-03
## [155,] 0.442218287 0.1953987782 2.877966e-02
## [156,] 0.275519452 0.4362391326 2.302373e-01
## [157,] 0.438655970 0.1794501695 2.447048e-02
## [158,] 0.204487093 0.0179374643 5.244873e-04
## [159,] 0.407438488 0.3355375785 9.210835e-02
## [160,] 0.306334128 0.4241549461 1.957638e-01
## [161,] 0.179450170 0.4386559699 3.574234e-01
## [162,] 0.443086838 0.2436977611 4.467792e-02
## [163,] 0.321175019 0.4163379880 1.798991e-01
## [164,] 0.204487093 0.0179374643 5.244873e-04
## [165,] 0.426168977 0.1482326877 1.718640e-02
## [166,] 0.430813836 0.2910904300 6.556091e-02
## [167,] 0.227598100 0.4443581954 2.891855e-01
## [168,] 0.211473264 0.4440938538 3.108657e-01
## [169,] 0.375000000 0.3750000000 1.250000e-01
## [170,] 0.416337988 0.3211750193 8.258786e-02
## [171,] 0.169380014 0.0116813803 2.685375e-04
## [172,] 0.438655970 0.1794501695 2.447048e-02
## [173,] 0.444093854 0.2114732637 3.356718e-02
## [174,] 0.397531973 0.3493462791 1.023338e-01
## [175,] 0.433331375 0.1637029640 2.061445e-02
## [176,] 0.375000000 0.3750000000 1.250000e-01
## [177,] 0.443086838 0.2436977611 4.467792e-02
## [178,] 0.406028666 0.1184250277 1.151354e-02
## [179,] 0.259696720 0.4403553087 2.488965e-01
## [180,] 0.033923836 0.2665444262 6.980925e-01
## [181,] 0.375000000 0.3750000000 1.250000e-01
## [182,] 0.377630828 0.0906313987 7.250512e-03
## [183,] 0.360146521 0.0776786613 5.584740e-03
## [184,] 0.444358195 0.2275981001 3.885821e-02
## [185,] 0.436239133 0.2755194522 5.800410e-02
## [186,] 0.386693968 0.3625255950 1.132892e-01
## [187,] 0.424154946 0.3063341278 7.374710e-02
## [188,] 0.406028666 0.1184250277 1.151354e-02
## [189,] 0.407438488 0.3355375785 9.210835e-02
## [190,] 0.335537578 0.4074384881 1.649156e-01
## [191,] 0.169380014 0.0116813803 2.685375e-04
## [192,] 0.321175019 0.4163379880 1.798991e-01
## [193,] 0.426168977 0.1482326877 1.718640e-02
## [194,] 0.444093854 0.2114732637 3.356718e-02
## [195,] 0.436239133 0.2755194522 5.800410e-02
## [196,] 0.266544426 0.0339238361 1.439193e-03
## [197,] 0.360146521 0.0776786613 5.584740e-03
## [198,] 0.340371253 0.0654560102 4.195898e-03
## [199,] 0.407438488 0.3355375785 9.210835e-02
## [200,] 0.275519452 0.4362391326 2.302373e-01
## [201,] 0.440355309 0.2596967205 5.105149e-02
## [202,] 0.195398778 0.4422182874 3.336033e-01
## [203,] 0.397531973 0.3493462791 1.023338e-01
## [204,] 0.318229499 0.0540389715 3.058810e-03
## [205,] 0.243697761 0.4430868383 2.685375e-01
## [206,] 0.318229499 0.0540389715 3.058810e-03
## [207,] 0.335537578 0.4074384881 1.649156e-01
## [208,] 0.416337988 0.3211750193 8.258786e-02
## [209,] 0.266544426 0.0339238361 1.439193e-03
## [210,] 0.440355309 0.2596967205 5.105149e-02
## [211,] 0.306334128 0.4241549461 1.957638e-01
## [212,] 0.204487093 0.0179374643 5.244873e-04
## [213,] 0.392899701 0.1042386963 9.218388e-03
## [214,] 0.335537578 0.4074384881 1.649156e-01
## [215,] 0.416337988 0.3211750193 8.258786e-02
## [216,] 0.443086838 0.2436977611 4.467792e-02
## [217,] 0.417093250 0.1331148669 1.416116e-02
## [218,] 0.266544426 0.0339238361 1.439193e-03
## [219,] 0.236850055 0.0253767916 9.063140e-04
## [220,] 0.236850055 0.0253767916 9.063140e-04
## [221,] 0.440355309 0.2596967205 5.105149e-02
## [222,] 0.436239133 0.2755194522 5.800410e-02
## [223,] 0.291090430 0.4308138364 2.125348e-01
## [224,] 0.211473264 0.4440938538 3.108657e-01
## [225,] 0.443086838 0.2436977611 4.467792e-02
## [226,] 0.440355309 0.2596967205 5.105149e-02
## [227,] 0.000000000 0.0000000000 1.000000e+00
## [228,] 0.321175019 0.4163379880 1.798991e-01
## [229,] 0.443086838 0.2436977611 4.467792e-02
## [230,] 0.433331375 0.1637029640 2.061445e-02
## [231,] 0.236850055 0.0253767916 9.063140e-04
## [232,] 0.377630828 0.0906313987 7.250512e-03
## [233,] 0.090631399 0.3776308281 5.244873e-01
## [234,] 0.306334128 0.4241549461 1.957638e-01
## [235,] 0.318229499 0.0540389715 3.058810e-03
## [236,] 0.321175019 0.4163379880 1.798991e-01
## [237,] 0.386693968 0.3625255950 1.132892e-01
## [238,] 0.227598100 0.4443581954 2.891855e-01
## [239,] 0.416337988 0.3211750193 8.258786e-02
## [240,] 0.430813836 0.2910904300 6.556091e-02
## [241,] 0.377630828 0.0906313987 7.250512e-03
## [242,] 0.259696720 0.4403553087 2.488965e-01
## [243,] 0.321175019 0.4163379880 1.798991e-01
## [244,] 0.436239133 0.2755194522 5.800410e-02
## [245,] 0.204487093 0.0179374643 5.244873e-04
## [246,] 0.243697761 0.4430868383 2.685375e-01
## [247,] 0.430813836 0.2910904300 6.556091e-02
## [248,] 0.417093250 0.1331148669 1.416116e-02
## [249,] 0.275519452 0.4362391326 2.302373e-01
## [250,] 0.442218287 0.1953987782 2.877966e-02
## [251,] 0.440355309 0.2596967205 5.105149e-02
## [252,] 0.417093250 0.1331148669 1.416116e-02
## [253,] 0.362525595 0.3866939680 1.374912e-01
## [254,] 0.321175019 0.4163379880 1.798991e-01
## [255,] 0.442218287 0.1953987782 2.877966e-02
## [256,] 0.090631399 0.0030210466 3.356718e-05
## [257,] 0.293645732 0.0435030714 2.148300e-03
## [258,] 0.360146521 0.0776786613 5.584740e-03
## [259,] 0.397531973 0.3493462791 1.023338e-01
## [260,] 0.306334128 0.4241549461 1.957638e-01
## [261,] 0.204487093 0.0179374643 5.244873e-04
## [262,] 0.430813836 0.2910904300 6.556091e-02
## [263,] 0.386693968 0.3625255950 1.132892e-01
## [264,] 0.417093250 0.1331148669 1.416116e-02
## [265,] 0.335537578 0.4074384881 1.649156e-01
## [266,] 0.349346279 0.3975319727 1.507880e-01
## [267,] 0.397531973 0.3493462791 1.023338e-01
## [268,] 0.340371253 0.0654560102 4.195898e-03
## [269,] 0.335537578 0.4074384881 1.649156e-01
## [270,] 0.204487093 0.0179374643 5.244873e-04
## [271,] 0.133114867 0.4170932496 4.356307e-01
## [272,] 0.318229499 0.0540389715 3.058810e-03
## [273,] 0.417093250 0.1331148669 1.416116e-02
## [274,] 0.375000000 0.3750000000 1.250000e-01
## [275,] 0.318229499 0.0540389715 3.058810e-03
## [276,] 0.443086838 0.2436977611 4.467792e-02
## [277,] 0.407438488 0.3355375785 9.210835e-02
## [278,] 0.321175019 0.4163379880 1.798991e-01
## [279,] 0.266544426 0.0339238361 1.439193e-03
## [280,] 0.433331375 0.1637029640 2.061445e-02
## [281,] 0.362525595 0.3866939680 1.374912e-01
## [282,] 0.426168977 0.1482326877 1.718640e-02
## [283,] 0.386693968 0.3625255950 1.132892e-01
## [284,] 0.375000000 0.3750000000 1.250000e-01
## [285,] 0.440355309 0.2596967205 5.105149e-02
## [286,] 0.442218287 0.1953987782 2.877966e-02
## [287,] 0.243697761 0.4430868383 2.685375e-01
## [288,] 0.340371253 0.0654560102 4.195898e-03
## [289,] 0.417093250 0.1331148669 1.416116e-02
## [290,] 0.362525595 0.3866939680 1.374912e-01
## [291,] 0.444093854 0.2114732637 3.356718e-02
## [292,] 0.375000000 0.3750000000 1.250000e-01
## [293,] 0.424154946 0.3063341278 7.374710e-02
## [294,] 0.362525595 0.3866939680 1.374912e-01
## [295,] 0.416337988 0.3211750193 8.258786e-02
## [296,] 0.424154946 0.3063341278 7.374710e-02
## [297,] 0.227598100 0.4443581954 2.891855e-01
## [298,] 0.349346279 0.3975319727 1.507880e-01
## [299,] 0.416337988 0.3211750193 8.258786e-02
## [300,] 0.417093250 0.1331148669 1.416116e-02
## [301,] 0.416337988 0.3211750193 8.258786e-02
## [302,] 0.362525595 0.3866939680 1.374912e-01
## [303,] 0.444358195 0.2275981001 3.885821e-02
## [304,] 0.375000000 0.3750000000 1.250000e-01
## [305,] 0.090631399 0.0030210466 3.356718e-05
## [306,] 0.392899701 0.1042386963 9.218388e-03
## [307,] 0.375000000 0.3750000000 1.250000e-01
## [308,] 0.275519452 0.4362391326 2.302373e-01
## [309,] 0.195398778 0.4422182874 3.336033e-01
## [310,] 0.275519452 0.4362391326 2.302373e-01
## [311,] 0.349346279 0.3975319727 1.507880e-01
## [312,] 0.436239133 0.2755194522 5.800410e-02
## [313,] 0.416337988 0.3211750193 8.258786e-02
## [314,] 0.377630828 0.0906313987 7.250512e-03
## [315,] 0.386693968 0.3625255950 1.132892e-01
## [316,] 0.417093250 0.1331148669 1.416116e-02
## [317,] 0.392899701 0.1042386963 9.218388e-03
## [318,] 0.386693968 0.3625255950 1.132892e-01
## [319,] 0.433331375 0.1637029640 2.061445e-02
## [320,] 0.397531973 0.3493462791 1.023338e-01
## [321,] 0.416337988 0.3211750193 8.258786e-02
## [322,] 0.335537578 0.4074384881 1.649156e-01
## [323,] 0.375000000 0.3750000000 1.250000e-01
## [324,] 0.407438488 0.3355375785 9.210835e-02
## [325,] 0.430813836 0.2910904300 6.556091e-02
## [326,] 0.424154946 0.3063341278 7.374710e-02
## [327,] 0.443086838 0.2436977611 4.467792e-02
## [328,] 0.417093250 0.1331148669 1.416116e-02
## [329,] 0.444093854 0.2114732637 3.356718e-02
## [330,] 0.440355309 0.2596967205 5.105149e-02
## [331,] 0.377630828 0.0906313987 7.250512e-03
## [332,] 0.349346279 0.3975319727 1.507880e-01
## [333,] 0.444358195 0.2275981001 3.885821e-02
## [334,] 0.433331375 0.1637029640 2.061445e-02
## [335,] 0.397531973 0.3493462791 1.023338e-01
## [336,] 0.349346279 0.3975319727 1.507880e-01
## [337,] 0.440355309 0.2596967205 5.105149e-02
## [338,] 0.163702964 0.4333313752 3.823512e-01
## [339,] 0.195398778 0.4422182874 3.336033e-01
## [340,] 0.407438488 0.3355375785 9.210835e-02
## [341,] 0.204487093 0.0179374643 5.244873e-04
## [342,] 0.416337988 0.3211750193 8.258786e-02
## [343,] 0.163702964 0.4333313752 3.823512e-01
## [344,] 0.227598100 0.4443581954 2.891855e-01
## [345,] 0.377630828 0.0906313987 7.250512e-03
## [346,] 0.416337988 0.3211750193 8.258786e-02
## [347,] 0.436239133 0.2755194522 5.800410e-02
## [348,] 0.335537578 0.4074384881 1.649156e-01
## [349,] 0.306334128 0.4241549461 1.957638e-01
## [350,] 0.377630828 0.0906313987 7.250512e-03
## [351,] 0.444093854 0.2114732637 3.356718e-02
## [352,] 0.444358195 0.2275981001 3.885821e-02
## [353,] 0.362525595 0.3866939680 1.374912e-01
## [354,] 0.397531973 0.3493462791 1.023338e-01
## [355,] 0.416337988 0.3211750193 8.258786e-02
## [356,] 0.424154946 0.3063341278 7.374710e-02
## [357,] 0.335537578 0.4074384881 1.649156e-01
## [358,] 0.436239133 0.2755194522 5.800410e-02
## [359,] 0.275519452 0.4362391326 2.302373e-01
## [360,] 0.362525595 0.3866939680 1.374912e-01
## [361,] 0.321175019 0.4163379880 1.798991e-01
## [362,] 0.318229499 0.0540389715 3.058810e-03
## [363,] 0.275519452 0.4362391326 2.302373e-01
## [364,] 0.362525595 0.3866939680 1.374912e-01
## [365,] 0.362525595 0.3866939680 1.374912e-01
## [366,] 0.375000000 0.3750000000 1.250000e-01
## [367,] 0.436239133 0.2755194522 5.800410e-02
## [368,] 0.362525595 0.3866939680 1.374912e-01
## [369,] 0.321175019 0.4163379880 1.798991e-01
## [370,] 0.340371253 0.0654560102 4.195898e-03
## [371,] 0.236850055 0.0253767916 9.063140e-04
## [372,] 0.266544426 0.0339238361 1.439193e-03
## [373,] 0.444093854 0.2114732637 3.356718e-02
## [374,] 0.397531973 0.3493462791 1.023338e-01
## [375,] 0.444093854 0.2114732637 3.356718e-02
## [376,] 0.444358195 0.2275981001 3.885821e-02
## [377,] 0.335537578 0.4074384881 1.649156e-01
## [378,] 0.195398778 0.4422182874 3.336033e-01
## [379,] 0.195398778 0.4422182874 3.336033e-01
## [380,] 0.318229499 0.0540389715 3.058810e-03
## [381,] 0.416337988 0.3211750193 8.258786e-02
## [382,] 0.243697761 0.4430868383 2.685375e-01
## [383,] 0.426168977 0.1482326877 1.718640e-02
## [384,] 0.443086838 0.2436977611 4.467792e-02
## [385,] 0.349346279 0.3975319727 1.507880e-01
## [386,] 0.362525595 0.3866939680 1.374912e-01
## [387,] 0.148232688 0.4261689772 4.084119e-01
## [388,] 0.306334128 0.4241549461 1.957638e-01
## [389,] 0.436239133 0.2755194522 5.800410e-02
## [390,] 0.392899701 0.1042386963 9.218388e-03
## [391,] 0.406028666 0.1184250277 1.151354e-02
## [392,] 0.349346279 0.3975319727 1.507880e-01
## [393,] 0.017937464 0.2044870934 7.770510e-01
## [394,] 0.340371253 0.0654560102 4.195898e-03
## [395,] 0.340371253 0.0654560102 4.195898e-03
## [396,] 0.406028666 0.1184250277 1.151354e-02
## [397,] 0.321175019 0.4163379880 1.798991e-01
## [398,] 0.438655970 0.1794501695 2.447048e-02
## [399,] 0.430813836 0.2910904300 6.556091e-02
## [400,] 0.349346279 0.3975319727 1.507880e-01
## [401,] 0.444358195 0.2275981001 3.885821e-02
## [402,] 0.227598100 0.4443581954 2.891855e-01
## [403,] 0.204487093 0.0179374643 5.244873e-04
## [404,] 0.443086838 0.2436977611 4.467792e-02
## [405,] 0.266544426 0.0339238361 1.439193e-03
## [406,] 0.397531973 0.3493462791 1.023338e-01
## [407,] 0.335537578 0.4074384881 1.649156e-01
## [408,] 0.417093250 0.1331148669 1.416116e-02
## [409,] 0.442218287 0.1953987782 2.877966e-02
## [410,] 0.426168977 0.1482326877 1.718640e-02
## [411,] 0.349346279 0.3975319727 1.507880e-01
## [412,] 0.362525595 0.3866939680 1.374912e-01
## [413,] 0.148232688 0.4261689772 4.084119e-01
## [414,] 0.306334128 0.4241549461 1.957638e-01
## [415,] 0.362525595 0.3866939680 1.374912e-01
## [416,] 0.406028666 0.1184250277 1.151354e-02
## [417,] 0.442218287 0.1953987782 2.877966e-02
## [418,] 0.046838810 0.0007678494 4.195898e-06
## [419,] 0.436239133 0.2755194522 5.800410e-02
## [420,] 0.293645732 0.0435030714 2.148300e-03
## [421,] 0.407438488 0.3355375785 9.210835e-02
## [422,] 0.000000000 0.0000000000 0.000000e+00
## [423,] 0.430813836 0.2910904300 6.556091e-02
## [424,] 0.179450170 0.4386559699 3.574234e-01
## [425,] 0.443086838 0.2436977611 4.467792e-02
## [426,] 0.406028666 0.1184250277 1.151354e-02
## [427,] 0.386693968 0.3625255950 1.132892e-01
## [428,] 0.433331375 0.1637029640 2.061445e-02
## [429,] 0.397531973 0.3493462791 1.023338e-01
## [430,] 0.291090430 0.4308138364 2.125348e-01
## [431,] 0.335537578 0.4074384881 1.649156e-01
## [432,] 0.318229499 0.0540389715 3.058810e-03
## [433,] 0.169380014 0.0116813803 2.685375e-04
## [434,] 0.436239133 0.2755194522 5.800410e-02
## [435,] 0.360146521 0.0776786613 5.584740e-03
## [436,] 0.392899701 0.1042386963 9.218388e-03
## [437,] 0.227598100 0.4443581954 2.891855e-01
## [438,] 0.438655970 0.1794501695 2.447048e-02
## [439,] 0.406028666 0.1184250277 1.151354e-02
## [440,] 0.406028666 0.1184250277 1.151354e-02
## [441,] 0.266544426 0.0339238361 1.439193e-03
## [442,] 0.430813836 0.2910904300 6.556091e-02
## [443,] 0.259696720 0.4403553087 2.488965e-01
## [444,] 0.375000000 0.3750000000 1.250000e-01
## [445,] 0.440355309 0.2596967205 5.105149e-02
## [446,] 0.211473264 0.4440938538 3.108657e-01
## [447,] 0.275519452 0.4362391326 2.302373e-01
## [448,] 0.318229499 0.0540389715 3.058810e-03
## [449,] 0.397531973 0.3493462791 1.023338e-01
## [450,] 0.440355309 0.2596967205 5.105149e-02
## [451,] 0.360146521 0.0776786613 5.584740e-03
## [452,] 0.436239133 0.2755194522 5.800410e-02
## [453,] 0.349346279 0.3975319727 1.507880e-01
## [454,] 0.397531973 0.3493462791 1.023338e-01
## [455,] 0.392899701 0.1042386963 9.218388e-03
## [456,] 0.227598100 0.4443581954 2.891855e-01
## [457,] 0.436239133 0.2755194522 5.800410e-02
## [458,] 0.433331375 0.1637029640 2.061445e-02
## [459,] 0.444093854 0.2114732637 3.356718e-02
## [460,] 0.416337988 0.3211750193 8.258786e-02
## [461,] 0.243697761 0.4430868383 2.685375e-01
## [462,] 0.293645732 0.0435030714 2.148300e-03
## [463,] 0.377630828 0.0906313987 7.250512e-03
## [464,] 0.444093854 0.2114732637 3.356718e-02
## [465,] 0.335537578 0.4074384881 1.649156e-01
## [466,] 0.321175019 0.4163379880 1.798991e-01
## [467,] 0.335537578 0.4074384881 1.649156e-01
## [468,] 0.318229499 0.0540389715 3.058810e-03
## [469,] 0.406028666 0.1184250277 1.151354e-02
## [470,] 0.430813836 0.2910904300 6.556091e-02
## [471,] 0.362525595 0.3866939680 1.374912e-01
## [472,] 0.321175019 0.4163379880 1.798991e-01
## [473,] 0.306334128 0.4241549461 1.957638e-01
## [474,] 0.236850055 0.0253767916 9.063140e-04
## [475,] 0.443086838 0.2436977611 4.467792e-02
## [476,] 0.377630828 0.0906313987 7.250512e-03
## [477,] 0.291090430 0.4308138364 2.125348e-01
## [478,] 0.416337988 0.3211750193 8.258786e-02
## [479,] 0.424154946 0.3063341278 7.374710e-02
## [480,] 0.442218287 0.1953987782 2.877966e-02
## [481,] 0.424154946 0.3063341278 7.374710e-02
## [482,] 0.335537578 0.4074384881 1.649156e-01
## [483,] 0.291090430 0.4308138364 2.125348e-01
## [484,] 0.430813836 0.2910904300 6.556091e-02
## [485,] 0.318229499 0.0540389715 3.058810e-03
## [486,] 0.430813836 0.2910904300 6.556091e-02
## [487,] 0.377630828 0.0906313987 7.250512e-03
## [488,] 0.430813836 0.2910904300 6.556091e-02
## [489,] 0.386693968 0.3625255950 1.132892e-01
## [490,] 0.417093250 0.1331148669 1.416116e-02
## [491,] 0.362525595 0.3866939680 1.374912e-01
## [492,] 0.375000000 0.3750000000 1.250000e-01
## [493,] 0.236850055 0.0253767916 9.063140e-04
## [494,] 0.424154946 0.3063341278 7.374710e-02
## [495,] 0.417093250 0.1331148669 1.416116e-02
## [496,] 0.386693968 0.3625255950 1.132892e-01
## [497,] 0.275519452 0.4362391326 2.302373e-01
## [498,] 0.424154946 0.3063341278 7.374710e-02
## [499,] 0.318229499 0.0540389715 3.058810e-03
## [500,] 0.243697761 0.4430868383 2.685375e-01
## [501,] 0.335537578 0.4074384881 1.649156e-01
## [502,] 0.349346279 0.3975319727 1.507880e-01
## [503,] 0.392899701 0.1042386963 9.218388e-03
## [504,] 0.416337988 0.3211750193 8.258786e-02
## [505,] 0.430813836 0.2910904300 6.556091e-02
## [506,] 0.407438488 0.3355375785 9.210835e-02
## [507,] 0.349346279 0.3975319727 1.507880e-01
## [508,] 0.335537578 0.4074384881 1.649156e-01
## [509,] 0.443086838 0.2436977611 4.467792e-02
## [510,] 0.293645732 0.0435030714 2.148300e-03
## [511,] 0.375000000 0.3750000000 1.250000e-01
## [512,] 0.444093854 0.2114732637 3.356718e-02
## [513,] 0.362525595 0.3866939680 1.374912e-01
## [514,] 0.163702964 0.4333313752 3.823512e-01
## [515,] 0.433331375 0.1637029640 2.061445e-02
## [516,] 0.417093250 0.1331148669 1.416116e-02
## [517,] 0.360146521 0.0776786613 5.584740e-03
## [518,] 0.179450170 0.4386559699 3.574234e-01
## [519,] 0.243697761 0.4430868383 2.685375e-01
## [520,] 0.444358195 0.2275981001 3.885821e-02
## [521,] 0.236850055 0.0253767916 9.063140e-04
## [522,] 0.195398778 0.4422182874 3.336033e-01
## [523,] 0.243697761 0.4430868383 2.685375e-01
## [524,] 0.397531973 0.3493462791 1.023338e-01
## [525,] 0.444093854 0.2114732637 3.356718e-02
## [526,] 0.392899701 0.1042386963 9.218388e-03
## [527,] 0.275519452 0.4362391326 2.302373e-01
## [528,] 0.424154946 0.3063341278 7.374710e-02
## [529,] 0.392899701 0.1042386963 9.218388e-03
## [530,] 0.291090430 0.4308138364 2.125348e-01
## [531,] 0.362525595 0.3866939680 1.374912e-01
## [532,] 0.266544426 0.0339238361 1.439193e-03
## [533,] 0.291090430 0.4308138364 2.125348e-01
## [534,] 0.340371253 0.0654560102 4.195898e-03
## [535,] 0.377630828 0.0906313987 7.250512e-03
## [536,] 0.407438488 0.3355375785 9.210835e-02
## [537,] 0.204487093 0.0179374643 5.244873e-04
## [538,] 0.211473264 0.4440938538 3.108657e-01
## [539,] 0.416337988 0.3211750193 8.258786e-02
## [540,] 0.417093250 0.1331148669 1.416116e-02
## [541,] 0.243697761 0.4430868383 2.685375e-01
## [542,] 0.236850055 0.0253767916 9.063140e-04
## [543,] 0.275519452 0.4362391326 2.302373e-01
## [544,] 0.275519452 0.4362391326 2.302373e-01
## [545,] 0.275519452 0.4362391326 2.302373e-01
## [546,] 0.416337988 0.3211750193 8.258786e-02
## [547,] 0.243697761 0.4430868383 2.685375e-01
## [548,] 0.377630828 0.0906313987 7.250512e-03
## [549,] 0.407438488 0.3355375785 9.210835e-02
## [550,] 0.386693968 0.3625255950 1.132892e-01
## [551,] 0.392899701 0.1042386963 9.218388e-03
## [552,] 0.306334128 0.4241549461 1.957638e-01
## [553,] 0.335537578 0.4074384881 1.649156e-01
## [554,] 0.065456010 0.3403712531 5.899768e-01
## [555,] 0.424154946 0.3063341278 7.374710e-02
## [556,] 0.426168977 0.1482326877 1.718640e-02
## [557,] 0.340371253 0.0654560102 4.195898e-03
## [558,] 0.444358195 0.2275981001 3.885821e-02
## [559,] 0.335537578 0.4074384881 1.649156e-01
## [560,] 0.426168977 0.1482326877 1.718640e-02
## [561,] 0.417093250 0.1331148669 1.416116e-02
## [562,] 0.416337988 0.3211750193 8.258786e-02
## [563,] 0.243697761 0.4430868383 2.685375e-01
## [564,] 0.163702964 0.4333313752 3.823512e-01
## [565,] 0.321175019 0.4163379880 1.798991e-01
## [566,] 0.131453291 0.0066840657 1.132892e-04
## [567,] 0.444093854 0.2114732637 3.356718e-02
## [568,] 0.000000000 0.0000000000 0.000000e+00
## [569,] 0.340371253 0.0654560102 4.195898e-03
## [570,] 0.417093250 0.1331148669 1.416116e-02
## [571,] 0.406028666 0.1184250277 1.151354e-02
## [572,] 0.340371253 0.0654560102 4.195898e-03
## [573,] 0.397531973 0.3493462791 1.023338e-01
## [574,] 0.321175019 0.4163379880 1.798991e-01
## [575,] 0.386693968 0.3625255950 1.132892e-01
## [576,] 0.438655970 0.1794501695 2.447048e-02
## [577,] 0.090631399 0.3776308281 5.244873e-01
## [578,] 0.133114867 0.4170932496 4.356307e-01
## [579,] 0.443086838 0.2436977611 4.467792e-02
## [580,] 0.438655970 0.1794501695 2.447048e-02
## [581,] 0.442218287 0.1953987782 2.877966e-02
## [582,] 0.236850055 0.0253767916 9.063140e-04
## [583,] 0.118425028 0.4060286664 4.640328e-01
## [584,] 0.417093250 0.1331148669 1.416116e-02
## [585,] 0.424154946 0.3063341278 7.374710e-02
## [586,] 0.386693968 0.3625255950 1.132892e-01
## [587,] 0.397531973 0.3493462791 1.023338e-01
## [588,] 0.440355309 0.2596967205 5.105149e-02
## [589,] 0.291090430 0.4308138364 2.125348e-01
## [590,] 0.417093250 0.1331148669 1.416116e-02
## [591,] 0.275519452 0.4362391326 2.302373e-01
## [592,] 0.360146521 0.0776786613 5.584740e-03
## [593,] 0.397531973 0.3493462791 1.023338e-01
## [594,] 0.416337988 0.3211750193 8.258786e-02
## [595,] 0.266544426 0.0339238361 1.439193e-03
## [596,] 0.416337988 0.3211750193 8.258786e-02
## [597,] 0.443086838 0.2436977611 4.467792e-02
## [598,] 0.275519452 0.4362391326 2.302373e-01
## [599,] 0.444358195 0.2275981001 3.885821e-02
## [600,] 0.291090430 0.4308138364 2.125348e-01
## [601,] 0.195398778 0.4422182874 3.336033e-01
## [602,] 0.444358195 0.2275981001 3.885821e-02
## [603,] 0.377630828 0.0906313987 7.250512e-03
## [604,] 0.417093250 0.1331148669 1.416116e-02
## [605,] 0.433331375 0.1637029640 2.061445e-02
## [606,] 0.442218287 0.1953987782 2.877966e-02
## [607,] 0.417093250 0.1331148669 1.416116e-02
## [608,] 0.386693968 0.3625255950 1.132892e-01
## [609,] 0.397531973 0.3493462791 1.023338e-01
## [610,] 0.211473264 0.4440938538 3.108657e-01
## [611,] 0.340371253 0.0654560102 4.195898e-03
## [612,] 0.340371253 0.0654560102 4.195898e-03
## [613,] 0.386693968 0.3625255950 1.132892e-01
## [614,] 0.360146521 0.0776786613 5.584740e-03
## [615,] 0.443086838 0.2436977611 4.467792e-02
## [616,] 0.406028666 0.1184250277 1.151354e-02
## [617,] 0.443086838 0.2436977611 4.467792e-02
## [618,] 0.436239133 0.2755194522 5.800410e-02
## [619,] 0.438655970 0.1794501695 2.447048e-02
## [620,] 0.444358195 0.2275981001 3.885821e-02
## [621,] 0.424154946 0.3063341278 7.374710e-02
## [622,] 0.430813836 0.2910904300 6.556091e-02
## [623,] 0.424154946 0.3063341278 7.374710e-02
## [624,] 0.360146521 0.0776786613 5.584740e-03
## [625,] 0.375000000 0.3750000000 1.250000e-01
## [626,] 0.407438488 0.3355375785 9.210835e-02
## [627,] 0.440355309 0.2596967205 5.105149e-02
## [628,] 0.335537578 0.4074384881 1.649156e-01
## [629,] 0.430813836 0.2910904300 6.556091e-02
## [630,] 0.444093854 0.2114732637 3.356718e-02
## [631,] 0.436239133 0.2755194522 5.800410e-02
## [632,] 0.275519452 0.4362391326 2.302373e-01
## [633,] 0.444358195 0.2275981001 3.885821e-02
## [634,] 0.417093250 0.1331148669 1.416116e-02
## [635,] 0.417093250 0.1331148669 1.416116e-02
## [636,] 0.440355309 0.2596967205 5.105149e-02
## [637,] 0.424154946 0.3063341278 7.374710e-02
## [638,] 0.416337988 0.3211750193 8.258786e-02
## [639,] 0.360146521 0.0776786613 5.584740e-03
## [640,] 0.436239133 0.2755194522 5.800410e-02
## [641,] 0.090631399 0.3776308281 5.244873e-01
## [642,] 0.397531973 0.3493462791 1.023338e-01
## [643,] 0.377630828 0.0906313987 7.250512e-03
## [644,] 0.375000000 0.3750000000 1.250000e-01
## [645,] 0.438655970 0.1794501695 2.447048e-02
## [646,] 0.424154946 0.3063341278 7.374710e-02
## [647,] 0.306334128 0.4241549461 1.957638e-01
## [648,] 0.436239133 0.2755194522 5.800410e-02
## [649,] 0.444358195 0.2275981001 3.885821e-02
## [650,] 0.377630828 0.0906313987 7.250512e-03
## [651,] 0.417093250 0.1331148669 1.416116e-02
## [652,] 0.340371253 0.0654560102 4.195898e-03
## [653,] 0.444093854 0.2114732637 3.356718e-02
## [654,] 0.377630828 0.0906313987 7.250512e-03
## [655,] 0.266544426 0.0339238361 1.439193e-03
## [656,] 0.293645732 0.0435030714 2.148300e-03
## [657,] 0.179450170 0.4386559699 3.574234e-01
## [658,] 0.406028666 0.1184250277 1.151354e-02
## [659,] 0.443086838 0.2436977611 4.467792e-02
## [660,] 0.375000000 0.3750000000 1.250000e-01
## [661,] 0.407438488 0.3355375785 9.210835e-02
## [662,] 0.436239133 0.2755194522 5.800410e-02
## [663,] 0.243697761 0.4430868383 2.685375e-01
## [664,] 0.377630828 0.0906313987 7.250512e-03
## [665,] 0.318229499 0.0540389715 3.058810e-03
## [666,] 0.291090430 0.4308138364 2.125348e-01
## [667,] 0.362525595 0.3866939680 1.374912e-01
## [668,] 0.291090430 0.4308138364 2.125348e-01
## [669,] 0.443086838 0.2436977611 4.467792e-02
## [670,] 0.406028666 0.1184250277 1.151354e-02
## [671,] 0.318229499 0.0540389715 3.058810e-03
## [672,] 0.375000000 0.3750000000 1.250000e-01
## [673,] 0.362525595 0.3866939680 1.374912e-01
## [674,] 0.259696720 0.4403553087 2.488965e-01
## [675,] 0.043503071 0.2936457319 6.607029e-01
## [676,] 0.438655970 0.1794501695 2.447048e-02
## [677,] 0.163702964 0.4333313752 3.823512e-01
## [678,] 0.407438488 0.3355375785 9.210835e-02
## [679,] 0.291090430 0.4308138364 2.125348e-01
## [680,] 0.424154946 0.3063341278 7.374710e-02
## [681,] 0.424154946 0.3063341278 7.374710e-02
## [682,] 0.406028666 0.1184250277 1.151354e-02
## [683,] 0.211473264 0.4440938538 3.108657e-01
## [684,] 0.436239133 0.2755194522 5.800410e-02
## [685,] 0.392899701 0.1042386963 9.218388e-03
## [686,] 0.306334128 0.4241549461 1.957638e-01
## [687,] 0.407438488 0.3355375785 9.210835e-02
## [688,] 0.362525595 0.3866939680 1.374912e-01
## [689,] 0.417093250 0.1331148669 1.416116e-02
## [690,] 0.426168977 0.1482326877 1.718640e-02
## [691,] 0.349346279 0.3975319727 1.507880e-01
## [692,] 0.417093250 0.1331148669 1.416116e-02
## [693,] 0.227598100 0.4443581954 2.891855e-01
## [694,] 0.340371253 0.0654560102 4.195898e-03
## [695,] 0.443086838 0.2436977611 4.467792e-02
## [696,] 0.360146521 0.0776786613 5.584740e-03
## [697,] 0.426168977 0.1482326877 1.718640e-02
## [698,] 0.266544426 0.0339238361 1.439193e-03
## [699,] 0.118425028 0.4060286664 4.640328e-01
## [700,] 0.430813836 0.2910904300 6.556091e-02
## [701,] 0.416337988 0.3211750193 8.258786e-02
## [702,] 0.433331375 0.1637029640 2.061445e-02
## [703,] 0.430813836 0.2910904300 6.556091e-02
## [704,] 0.375000000 0.3750000000 1.250000e-01
## [705,] 0.211473264 0.4440938538 3.108657e-01
## [706,] 0.291090430 0.4308138364 2.125348e-01
## [707,] 0.406028666 0.1184250277 1.151354e-02
## [708,] 0.321175019 0.4163379880 1.798991e-01
## [709,] 0.259696720 0.4403553087 2.488965e-01
## [710,] 0.227598100 0.4443581954 2.891855e-01
## [711,] 0.275519452 0.4362391326 2.302373e-01
## [712,] 0.211473264 0.4440938538 3.108657e-01
## [713,] 0.386693968 0.3625255950 1.132892e-01
## [714,] 0.444358195 0.2275981001 3.885821e-02
## [715,] 0.406028666 0.1184250277 1.151354e-02
## [716,] 0.349346279 0.3975319727 1.507880e-01
## [717,] 0.397531973 0.3493462791 1.023338e-01
## [718,] 0.424154946 0.3063341278 7.374710e-02
## [719,] 0.407438488 0.3355375785 9.210835e-02
## [720,] 0.236850055 0.0253767916 9.063140e-04
## [721,] 0.442218287 0.1953987782 2.877966e-02
## [722,] 0.392899701 0.1042386963 9.218388e-03
## [723,] 0.043503071 0.2936457319 6.607029e-01
## [724,] 0.362525595 0.3866939680 1.374912e-01
## [725,] 0.318229499 0.0540389715 3.058810e-03
## [726,] 0.318229499 0.0540389715 3.058810e-03
## [727,] 0.440355309 0.2596967205 5.105149e-02
## [728,] 0.090631399 0.0030210466 3.356718e-05
## [729,] 0.266544426 0.0339238361 1.439193e-03
## [730,] 0.440355309 0.2596967205 5.105149e-02
## [731,] 0.321175019 0.4163379880 1.798991e-01
## [732,] 0.416337988 0.3211750193 8.258786e-02
## [733,] 0.406028666 0.1184250277 1.151354e-02
## [734,] 0.397531973 0.3493462791 1.023338e-01
## [735,] 0.293645732 0.0435030714 2.148300e-03
## [736,] 0.406028666 0.1184250277 1.151354e-02
## [737,] 0.407438488 0.3355375785 9.210835e-02
## [738,] 0.397531973 0.3493462791 1.023338e-01
## [739,] 0.291090430 0.4308138364 2.125348e-01
## [740,] 0.375000000 0.3750000000 1.250000e-01
## [741,] 0.266544426 0.0339238361 1.439193e-03
## [742,] 0.211473264 0.4440938538 3.108657e-01
## [743,] 0.179450170 0.4386559699 3.574234e-01
## [744,] 0.163702964 0.4333313752 3.823512e-01
## [745,] 0.360146521 0.0776786613 5.584740e-03
## [746,] 0.349346279 0.3975319727 1.507880e-01
## [747,] 0.340371253 0.0654560102 4.195898e-03
## [748,] 0.438655970 0.1794501695 2.447048e-02
## [749,] 0.340371253 0.0654560102 4.195898e-03
## [750,] 0.444093854 0.2114732637 3.356718e-02
## [751,] 0.433331375 0.1637029640 2.061445e-02
## [752,] 0.440355309 0.2596967205 5.105149e-02
## [753,] 0.227598100 0.4443581954 2.891855e-01
## [754,] 0.349346279 0.3975319727 1.507880e-01
## [755,] 0.426168977 0.1482326877 1.718640e-02
## [756,] 0.406028666 0.1184250277 1.151354e-02
## [757,] 0.362525595 0.3866939680 1.374912e-01
## [758,] 0.266544426 0.0339238361 1.439193e-03
## [759,] 0.430813836 0.2910904300 6.556091e-02
## [760,] 0.362525595 0.3866939680 1.374912e-01
## [761,] 0.444358195 0.2275981001 3.885821e-02
## [762,] 0.406028666 0.1184250277 1.151354e-02
## [763,] 0.163702964 0.4333313752 3.823512e-01
## [764,] 0.104238696 0.3928997013 4.936432e-01
## [765,] 0.444358195 0.2275981001 3.885821e-02
## [766,] 0.397531973 0.3493462791 1.023338e-01
## [767,] 0.195398778 0.4422182874 3.336033e-01
## [768,] 0.195398778 0.4422182874 3.336033e-01
## [769,] 0.131453291 0.0066840657 1.132892e-04
## [770,] 0.397531973 0.3493462791 1.023338e-01
## [771,] 0.438655970 0.1794501695 2.447048e-02
## [772,] 0.438655970 0.1794501695 2.447048e-02
## [773,] 0.436239133 0.2755194522 5.800410e-02
## [774,] 0.306334128 0.4241549461 1.957638e-01
## [775,] 0.318229499 0.0540389715 3.058810e-03
## [776,] 0.438655970 0.1794501695 2.447048e-02
## [777,] 0.433331375 0.1637029640 2.061445e-02
## [778,] 0.436239133 0.2755194522 5.800410e-02
## [779,] 0.440355309 0.2596967205 5.105149e-02
## [780,] 0.433331375 0.1637029640 2.061445e-02
## [781,] 0.426168977 0.1482326877 1.718640e-02
## [782,] 0.406028666 0.1184250277 1.151354e-02
## [783,] 0.375000000 0.3750000000 1.250000e-01
## [784,] 0.377630828 0.0906313987 7.250512e-03
## [785,] 0.417093250 0.1331148669 1.416116e-02
## [786,] 0.442218287 0.1953987782 2.877966e-02
## [787,] 0.407438488 0.3355375785 9.210835e-02
## [788,] 0.163702964 0.4333313752 3.823512e-01
## [789,] 0.440355309 0.2596967205 5.105149e-02
## [790,] 0.443086838 0.2436977611 4.467792e-02
## [791,] 0.416337988 0.3211750193 8.258786e-02
## [792,] 0.386693968 0.3625255950 1.132892e-01
## [793,] 0.340371253 0.0654560102 4.195898e-03
## [794,] 0.133114867 0.4170932496 4.356307e-01
## [795,] 0.386693968 0.3625255950 1.132892e-01
## [796,] 0.377630828 0.0906313987 7.250512e-03
## [797,] 0.442218287 0.1953987782 2.877966e-02
## [798,] 0.433331375 0.1637029640 2.061445e-02
## [799,] 0.417093250 0.1331148669 1.416116e-02
## [800,] 0.440355309 0.2596967205 5.105149e-02
## [801,] 0.426168977 0.1482326877 1.718640e-02
## [802,] 0.375000000 0.3750000000 1.250000e-01
## [803,] 0.179450170 0.4386559699 3.574234e-01
## [804,] 0.392899701 0.1042386963 9.218388e-03
## [805,] 0.430813836 0.2910904300 6.556091e-02
## [806,] 0.386693968 0.3625255950 1.132892e-01
## [807,] 0.362525595 0.3866939680 1.374912e-01
## [808,] 0.335537578 0.4074384881 1.649156e-01
## [809,] 0.407438488 0.3355375785 9.210835e-02
## [810,] 0.443086838 0.2436977611 4.467792e-02
## [811,] 0.430813836 0.2910904300 6.556091e-02
## [812,] 0.306334128 0.4241549461 1.957638e-01
## [813,] 0.406028666 0.1184250277 1.151354e-02
## [814,] 0.340371253 0.0654560102 4.195898e-03
## [815,] 0.417093250 0.1331148669 1.416116e-02
## [816,] 0.440355309 0.2596967205 5.105149e-02
## [817,] 0.392899701 0.1042386963 9.218388e-03
## [818,] 0.386693968 0.3625255950 1.132892e-01
## [819,] 0.362525595 0.3866939680 1.374912e-01
## [820,] 0.397531973 0.3493462791 1.023338e-01
## [821,] 0.443086838 0.2436977611 4.467792e-02
## [822,] 0.306334128 0.4241549461 1.957638e-01
## [823,] 0.236850055 0.0253767916 9.063140e-04
## [824,] 0.426168977 0.1482326877 1.718640e-02
## [825,] 0.377630828 0.0906313987 7.250512e-03
## [826,] 0.433331375 0.1637029640 2.061445e-02
## [827,] 0.054038972 0.3182294988 6.246727e-01
## [828,] 0.444358195 0.2275981001 3.885821e-02
## [829,] 0.417093250 0.1331148669 1.416116e-02
## [830,] 0.011681380 0.1693800141 8.186701e-01
## [831,] 0.426168977 0.1482326877 1.718640e-02
## [832,] 0.293645732 0.0435030714 2.148300e-03
## [833,] 0.349346279 0.3975319727 1.507880e-01
## [834,] 0.266544426 0.0339238361 1.439193e-03
## [835,] 0.179450170 0.4386559699 3.574234e-01
## [836,] 0.442218287 0.1953987782 2.877966e-02
## [837,] 0.406028666 0.1184250277 1.151354e-02
## [838,] 0.438655970 0.1794501695 2.447048e-02
## [839,] 0.444358195 0.2275981001 3.885821e-02
## [840,] 0.407438488 0.3355375785 9.210835e-02
## [841,] 0.386693968 0.3625255950 1.132892e-01
## [842,] 0.362525595 0.3866939680 1.374912e-01
## [843,] 0.386693968 0.3625255950 1.132892e-01
## [844,] 0.397531973 0.3493462791 1.023338e-01
## [845,] 0.090631399 0.0030210466 3.356718e-05
## [846,] 0.211473264 0.4440938538 3.108657e-01
## [847,] 0.442218287 0.1953987782 2.877966e-02
## [848,] 0.306334128 0.4241549461 1.957638e-01
## [849,] 0.349346279 0.3975319727 1.507880e-01
## [850,] 0.433331375 0.1637029640 2.061445e-02
## [851,] 0.444093854 0.2114732637 3.356718e-02
## [852,] 0.179450170 0.4386559699 3.574234e-01
## [853,] 0.397531973 0.3493462791 1.023338e-01
## [854,] 0.340371253 0.0654560102 4.195898e-03
## [855,] 0.195398778 0.4422182874 3.336033e-01
## [856,] 0.293645732 0.0435030714 2.148300e-03
## [857,] 0.340371253 0.0654560102 4.195898e-03
## [858,] 0.436239133 0.2755194522 5.800410e-02
## [859,] 0.362525595 0.3866939680 1.374912e-01
## [860,] 0.407438488 0.3355375785 9.210835e-02
## [861,] 0.443086838 0.2436977611 4.467792e-02
## [862,] 0.444093854 0.2114732637 3.356718e-02
## [863,] 0.430813836 0.2910904300 6.556091e-02
## [864,] 0.430813836 0.2910904300 6.556091e-02
## [865,] 0.243697761 0.4430868383 2.685375e-01
## [866,] 0.211473264 0.4440938538 3.108657e-01
## [867,] 0.416337988 0.3211750193 8.258786e-02
## [868,] 0.397531973 0.3493462791 1.023338e-01
## [869,] 0.227598100 0.4443581954 2.891855e-01
## [870,] 0.438655970 0.1794501695 2.447048e-02
## [871,] 0.443086838 0.2436977611 4.467792e-02
## [872,] 0.436239133 0.2755194522 5.800410e-02
## [873,] 0.444093854 0.2114732637 3.356718e-02
## [874,] 0.243697761 0.4430868383 2.685375e-01
## [875,] 0.433331375 0.1637029640 2.061445e-02
## [876,] 0.377630828 0.0906313987 7.250512e-03
## [877,] 0.443086838 0.2436977611 4.467792e-02
## [878,] 0.426168977 0.1482326877 1.718640e-02
## [879,] 0.306334128 0.4241549461 1.957638e-01
## [880,] 0.362525595 0.3866939680 1.374912e-01
## [881,] 0.436239133 0.2755194522 5.800410e-02
## [882,] 0.416337988 0.3211750193 8.258786e-02
## [883,] 0.227598100 0.4443581954 2.891855e-01
## [884,] 0.424154946 0.3063341278 7.374710e-02
## [885,] 0.293645732 0.0435030714 2.148300e-03
## [886,] 0.443086838 0.2436977611 4.467792e-02
## [887,] 0.169380014 0.0116813803 2.685375e-04
## [888,] 0.430813836 0.2910904300 6.556091e-02
## [889,] 0.424154946 0.3063341278 7.374710e-02
## [890,] 0.321175019 0.4163379880 1.798991e-01
## [891,] 0.306334128 0.4241549461 1.957638e-01
## [892,] 0.291090430 0.4308138364 2.125348e-01
## [893,] 0.386693968 0.3625255950 1.132892e-01
## [894,] 0.444093854 0.2114732637 3.356718e-02
## [895,] 0.266544426 0.0339238361 1.439193e-03
## [896,] 0.227598100 0.4443581954 2.891855e-01
## [897,] 0.444093854 0.2114732637 3.356718e-02
## [898,] 0.443086838 0.2436977611 4.467792e-02
## [899,] 0.211473264 0.4440938538 3.108657e-01
## [900,] 0.426168977 0.1482326877 1.718640e-02
## [901,] 0.444358195 0.2275981001 3.885821e-02
## [902,] 0.293645732 0.0435030714 2.148300e-03
## [903,] 0.340371253 0.0654560102 4.195898e-03
## [904,] 0.318229499 0.0540389715 3.058810e-03
## [905,] 0.426168977 0.1482326877 1.718640e-02
## [906,] 0.444093854 0.2114732637 3.356718e-02
## [907,] 0.243697761 0.4430868383 2.685375e-01
## [908,] 0.436239133 0.2755194522 5.800410e-02
## [909,] 0.406028666 0.1184250277 1.151354e-02
## [910,] 0.318229499 0.0540389715 3.058810e-03
## [911,] 0.362525595 0.3866939680 1.374912e-01
## [912,] 0.266544426 0.0339238361 1.439193e-03
## [913,] 0.211473264 0.4440938538 3.108657e-01
## [914,] 0.179450170 0.4386559699 3.574234e-01
## [915,] 0.444358195 0.2275981001 3.885821e-02
## [916,] 0.204487093 0.0179374643 5.244873e-04
## [917,] 0.397531973 0.3493462791 1.023338e-01
## [918,] 0.406028666 0.1184250277 1.151354e-02
## [919,] 0.259696720 0.4403553087 2.488965e-01
## [920,] 0.443086838 0.2436977611 4.467792e-02
## [921,] 0.259696720 0.4403553087 2.488965e-01
## [922,] 0.340371253 0.0654560102 4.195898e-03
## [923,] 0.243697761 0.4430868383 2.685375e-01
## [924,] 0.440355309 0.2596967205 5.105149e-02
## [925,] 0.321175019 0.4163379880 1.798991e-01
## [926,] 0.318229499 0.0540389715 3.058810e-03
## [927,] 0.046838810 0.0007678494 4.195898e-06
## [928,] 0.204487093 0.0179374643 5.244873e-04
## [929,] 0.392899701 0.1042386963 9.218388e-03
## [930,] 0.436239133 0.2755194522 5.800410e-02
## [931,] 0.335537578 0.4074384881 1.649156e-01
## [932,] 0.090631399 0.0030210466 3.356718e-05
## [933,] 0.293645732 0.0435030714 2.148300e-03
## [934,] 0.443086838 0.2436977611 4.467792e-02
## [935,] 0.360146521 0.0776786613 5.584740e-03
## [936,] 0.442218287 0.1953987782 2.877966e-02
## [937,] 0.442218287 0.1953987782 2.877966e-02
## [938,] 0.169380014 0.0116813803 2.685375e-04
## [939,] 0.436239133 0.2755194522 5.800410e-02
## [940,] 0.424154946 0.3063341278 7.374710e-02
## [941,] 0.416337988 0.3211750193 8.258786e-02
## [942,] 0.436239133 0.2755194522 5.800410e-02
## [943,] 0.335537578 0.4074384881 1.649156e-01
## [944,] 0.407438488 0.3355375785 9.210835e-02
## [945,] 0.227598100 0.4443581954 2.891855e-01
## [946,] 0.335537578 0.4074384881 1.649156e-01
## [947,] 0.148232688 0.4261689772 4.084119e-01
## [948,] 0.416337988 0.3211750193 8.258786e-02
## [949,] 0.321175019 0.4163379880 1.798991e-01
## [950,] 0.340371253 0.0654560102 4.195898e-03
## [951,] 0.335537578 0.4074384881 1.649156e-01
## [952,] 0.440355309 0.2596967205 5.105149e-02
## [953,] 0.424154946 0.3063341278 7.374710e-02
## [954,] 0.386693968 0.3625255950 1.132892e-01
## [955,] 0.397531973 0.3493462791 1.023338e-01
## [956,] 0.392899701 0.1042386963 9.218388e-03
## [957,] 0.340371253 0.0654560102 4.195898e-03
## [958,] 0.416337988 0.3211750193 8.258786e-02
## [959,] 0.275519452 0.4362391326 2.302373e-01
## [960,] 0.397531973 0.3493462791 1.023338e-01
## [961,] 0.440355309 0.2596967205 5.105149e-02
## [962,] 0.340371253 0.0654560102 4.195898e-03
## [963,] 0.386693968 0.3625255950 1.132892e-01
## [964,] 0.397531973 0.3493462791 1.023338e-01
## [965,] 0.259696720 0.4403553087 2.488965e-01
## [966,] 0.444358195 0.2275981001 3.885821e-02
## [967,] 0.416337988 0.3211750193 8.258786e-02
## [968,] 0.335537578 0.4074384881 1.649156e-01
## [969,] 0.443086838 0.2436977611 4.467792e-02
## [970,] 0.386693968 0.3625255950 1.132892e-01
## [971,] 0.416337988 0.3211750193 8.258786e-02
## [972,] 0.259696720 0.4403553087 2.488965e-01
## [973,] 0.006684066 0.1314532913 8.617494e-01
## [974,] 0.386693968 0.3625255950 1.132892e-01
## [975,] 0.275519452 0.4362391326 2.302373e-01
## [976,] 0.444358195 0.2275981001 3.885821e-02
## [977,] 0.375000000 0.3750000000 1.250000e-01
## [978,] 0.243697761 0.4430868383 2.685375e-01
## [979,] 0.407438488 0.3355375785 9.210835e-02
## [980,] 0.444358195 0.2275981001 3.885821e-02
## [981,] 0.293645732 0.0435030714 2.148300e-03
## [982,] 0.397531973 0.3493462791 1.023338e-01
## [983,] 0.443086838 0.2436977611 4.467792e-02
## [984,] 0.195398778 0.4422182874 3.336033e-01
## [985,] 0.444093854 0.2114732637 3.356718e-02
## [986,] 0.000000000 0.0000000000 0.000000e+00
## [987,] 0.318229499 0.0540389715 3.058810e-03
## [988,] 0.360146521 0.0776786613 5.584740e-03
## [989,] 0.362525595 0.3866939680 1.374912e-01
## [990,] 0.266544426 0.0339238361 1.439193e-03
## [991,] 0.433331375 0.1637029640 2.061445e-02
## [992,] 0.440355309 0.2596967205 5.105149e-02
## [993,] 0.444093854 0.2114732637 3.356718e-02
## [994,] 0.375000000 0.3750000000 1.250000e-01
## [995,] 0.438655970 0.1794501695 2.447048e-02
## [996,] 0.118425028 0.4060286664 4.640328e-01
## [997,] 0.340371253 0.0654560102 4.195898e-03
## [998,] 0.436239133 0.2755194522 5.800410e-02
## [999,] 0.090631399 0.0030210466 3.356718e-05
## [1000,] 0.442218287 0.1953987782 2.877966e-02
## [1001,] 0.243697761 0.4430868383 2.685375e-01
## [1002,] 0.416337988 0.3211750193 8.258786e-02
## [1003,] 0.148232688 0.4261689772 4.084119e-01
## [1004,] 0.416337988 0.3211750193 8.258786e-02
## [1005,] 0.335537578 0.4074384881 1.649156e-01
## [1006,] 0.436239133 0.2755194522 5.800410e-02
## [1007,] 0.443086838 0.2436977611 4.467792e-02
## [1008,] 0.407438488 0.3355375785 9.210835e-02
## [1009,] 0.291090430 0.4308138364 2.125348e-01
## [1010,] 0.321175019 0.4163379880 1.798991e-01
## [1011,] 0.416337988 0.3211750193 8.258786e-02
## [1012,] 0.406028666 0.1184250277 1.151354e-02
## [1013,] 0.436239133 0.2755194522 5.800410e-02
## [1014,] 0.433331375 0.1637029640 2.061445e-02
## [1015,] 0.444093854 0.2114732637 3.356718e-02
## [1016,] 0.392899701 0.1042386963 9.218388e-03
## [1017,] 0.440355309 0.2596967205 5.105149e-02
## [1018,] 0.416337988 0.3211750193 8.258786e-02
## [1019,] 0.362525595 0.3866939680 1.374912e-01
## [1020,] 0.360146521 0.0776786613 5.584740e-03
## [1021,] 0.406028666 0.1184250277 1.151354e-02
## [1022,] 0.349346279 0.3975319727 1.507880e-01
## [1023,] 0.360146521 0.0776786613 5.584740e-03
## [1024,] 0.406028666 0.1184250277 1.151354e-02
## [1025,] 0.392899701 0.1042386963 9.218388e-03
## [1026,] 0.360146521 0.0776786613 5.584740e-03
## [1027,] 0.340371253 0.0654560102 4.195898e-03
## [1028,] 0.362525595 0.3866939680 1.374912e-01
## [1029,] 0.375000000 0.3750000000 1.250000e-01
## [1030,] 0.293645732 0.0435030714 2.148300e-03
## [1031,] 0.392899701 0.1042386963 9.218388e-03
## [1032,] 0.179450170 0.4386559699 3.574234e-01
## [1033,] 0.433331375 0.1637029640 2.061445e-02
## [1034,] 0.291090430 0.4308138364 2.125348e-01
## [1035,] 0.430813836 0.2910904300 6.556091e-02
## [1036,] 0.243697761 0.4430868383 2.685375e-01
## [1037,] 0.444093854 0.2114732637 3.356718e-02
## [1038,] 0.375000000 0.3750000000 1.250000e-01
## [1039,] 0.179450170 0.4386559699 3.574234e-01
## [1040,] 0.293645732 0.0435030714 2.148300e-03
## [1041,] 0.407438488 0.3355375785 9.210835e-02
## [1042,] 0.243697761 0.4430868383 2.685375e-01
## [1043,] 0.163702964 0.4333313752 3.823512e-01
## [1044,] 0.104238696 0.3928997013 4.936432e-01
## [1045,] 0.349346279 0.3975319727 1.507880e-01
## [1046,] 0.407438488 0.3355375785 9.210835e-02
## [1047,] 0.443086838 0.2436977611 4.467792e-02
## [1048,] 0.131453291 0.0066840657 1.132892e-04
## [1049,] 0.349346279 0.3975319727 1.507880e-01
## [1050,] 0.430813836 0.2910904300 6.556091e-02
## [1051,] 0.416337988 0.3211750193 8.258786e-02
## [1052,] 0.417093250 0.1331148669 1.416116e-02
## [1053,] 0.444093854 0.2114732637 3.356718e-02
## [1054,] 0.424154946 0.3063341278 7.374710e-02
## [1055,] 0.362525595 0.3866939680 1.374912e-01
## [1056,] 0.291090430 0.4308138364 2.125348e-01
## [1057,] 0.375000000 0.3750000000 1.250000e-01
## [1058,] 0.443086838 0.2436977611 4.467792e-02
## [1059,] 0.131453291 0.0066840657 1.132892e-04
## [1060,] 0.211473264 0.4440938538 3.108657e-01
## [1061,] 0.195398778 0.4422182874 3.336033e-01
## [1062,] 0.424154946 0.3063341278 7.374710e-02
## [1063,] 0.430813836 0.2910904300 6.556091e-02
## [1064,] 0.360146521 0.0776786613 5.584740e-03
## [1065,] 0.293645732 0.0435030714 2.148300e-03
## [1066,] 0.340371253 0.0654560102 4.195898e-03
## [1067,] 0.444093854 0.2114732637 3.356718e-02
## [1068,] 0.416337988 0.3211750193 8.258786e-02
## [1069,] 0.444358195 0.2275981001 3.885821e-02
## [1070,] 0.424154946 0.3063341278 7.374710e-02
## [1071,] 0.416337988 0.3211750193 8.258786e-02
## [1072,] 0.275519452 0.4362391326 2.302373e-01
## [1073,] 0.443086838 0.2436977611 4.467792e-02
## [1074,] 0.054038972 0.3182294988 6.246727e-01
## [1075,] 0.377630828 0.0906313987 7.250512e-03
## [1076,] 0.416337988 0.3211750193 8.258786e-02
## [1077,] 0.440355309 0.2596967205 5.105149e-02
## [1078,] 0.443086838 0.2436977611 4.467792e-02
## [1079,] 0.407438488 0.3355375785 9.210835e-02
## [1080,] 0.444093854 0.2114732637 3.356718e-02
## [1081,] 0.293645732 0.0435030714 2.148300e-03
## [1082,] 0.407438488 0.3355375785 9.210835e-02
## [1083,] 0.436239133 0.2755194522 5.800410e-02
## [1084,] 0.426168977 0.1482326877 1.718640e-02
## [1085,] 0.407438488 0.3355375785 9.210835e-02
## [1086,] 0.442218287 0.1953987782 2.877966e-02
## [1087,] 0.335537578 0.4074384881 1.649156e-01
## [1088,] 0.430813836 0.2910904300 6.556091e-02
## [1089,] 0.335537578 0.4074384881 1.649156e-01
## [1090,] 0.397531973 0.3493462791 1.023338e-01
## [1091,] 0.444093854 0.2114732637 3.356718e-02
## [1092,] 0.321175019 0.4163379880 1.798991e-01
## [1093,] 0.433331375 0.1637029640 2.061445e-02
## [1094,] 0.444358195 0.2275981001 3.885821e-02
## [1095,] 0.416337988 0.3211750193 8.258786e-02
## [1096,] 0.195398778 0.4422182874 3.336033e-01
## [1097,] 0.148232688 0.4261689772 4.084119e-01
## [1098,] 0.444358195 0.2275981001 3.885821e-02
## [1099,] 0.407438488 0.3355375785 9.210835e-02
## [1100,] 0.266544426 0.0339238361 1.439193e-03
## [1101,] 0.243697761 0.4430868383 2.685375e-01
## [1102,] 0.335537578 0.4074384881 1.649156e-01
## [1103,] 0.416337988 0.3211750193 8.258786e-02
## [1104,] 0.440355309 0.2596967205 5.105149e-02
## [1105,] 0.436239133 0.2755194522 5.800410e-02
## [1106,] 0.392899701 0.1042386963 9.218388e-03
## [1107,] 0.397531973 0.3493462791 1.023338e-01
## [1108,] 0.444358195 0.2275981001 3.885821e-02
## [1109,] 0.321175019 0.4163379880 1.798991e-01
## [1110,] 0.440355309 0.2596967205 5.105149e-02
## [1111,] 0.163702964 0.4333313752 3.823512e-01
## [1112,] 0.204487093 0.0179374643 5.244873e-04
## [1113,] 0.179450170 0.4386559699 3.574234e-01
## [1114,] 0.430813836 0.2910904300 6.556091e-02
## [1115,] 0.360146521 0.0776786613 5.584740e-03
## [1116,] 0.426168977 0.1482326877 1.718640e-02
## [1117,] 0.444093854 0.2114732637 3.356718e-02
## [1118,] 0.266544426 0.0339238361 1.439193e-03
## [1119,] 0.375000000 0.3750000000 1.250000e-01
## [1120,] 0.407438488 0.3355375785 9.210835e-02
## [1121,] 0.377630828 0.0906313987 7.250512e-03
## [1122,] 0.417093250 0.1331148669 1.416116e-02
## [1123,] 0.360146521 0.0776786613 5.584740e-03
## [1124,] 0.406028666 0.1184250277 1.151354e-02
## [1125,] 0.306334128 0.4241549461 1.957638e-01
## [1126,] 0.443086838 0.2436977611 4.467792e-02
## [1127,] 0.377630828 0.0906313987 7.250512e-03
## [1128,] 0.375000000 0.3750000000 1.250000e-01
## [1129,] 0.266544426 0.0339238361 1.439193e-03
## [1130,] 0.424154946 0.3063341278 7.374710e-02
## [1131,] 0.440355309 0.2596967205 5.105149e-02
## [1132,] 0.306334128 0.4241549461 1.957638e-01
## [1133,] 0.266544426 0.0339238361 1.439193e-03
## [1134,] 0.163702964 0.4333313752 3.823512e-01
## [1135,] 0.375000000 0.3750000000 1.250000e-01
## [1136,] 0.236850055 0.0253767916 9.063140e-04
## [1137,] 0.259696720 0.4403553087 2.488965e-01
## [1138,] 0.397531973 0.3493462791 1.023338e-01
## [1139,] 0.424154946 0.3063341278 7.374710e-02
## [1140,] 0.275519452 0.4362391326 2.302373e-01
## [1141,] 0.426168977 0.1482326877 1.718640e-02
## [1142,] 0.204487093 0.0179374643 5.244873e-04
## [1143,] 0.377630828 0.0906313987 7.250512e-03
## [1144,] 0.444093854 0.2114732637 3.356718e-02
## [1145,] 0.243697761 0.4430868383 2.685375e-01
## [1146,] 0.438655970 0.1794501695 2.447048e-02
## [1147,] 0.386693968 0.3625255950 1.132892e-01
## [1148,] 0.433331375 0.1637029640 2.061445e-02
## [1149,] 0.169380014 0.0116813803 2.685375e-04
## [1150,] 0.362525595 0.3866939680 1.374912e-01
## [1151,] 0.243697761 0.4430868383 2.685375e-01
## [1152,] 0.090631399 0.0030210466 3.356718e-05
## [1153,] 0.444358195 0.2275981001 3.885821e-02
## [1154,] 0.406028666 0.1184250277 1.151354e-02
## [1155,] 0.236850055 0.0253767916 9.063140e-04
## [1156,] 0.321175019 0.4163379880 1.798991e-01
## [1157,] 0.433331375 0.1637029640 2.061445e-02
## [1158,] 0.236850055 0.0253767916 9.063140e-04
## [1159,] 0.259696720 0.4403553087 2.488965e-01
## [1160,] 0.430813836 0.2910904300 6.556091e-02
## [1161,] 0.417093250 0.1331148669 1.416116e-02
## [1162,] 0.443086838 0.2436977611 4.467792e-02
## [1163,] 0.444358195 0.2275981001 3.885821e-02
## [1164,] 0.433331375 0.1637029640 2.061445e-02
## [1165,] 0.433331375 0.1637029640 2.061445e-02
## [1166,] 0.259696720 0.4403553087 2.488965e-01
## [1167,] 0.386693968 0.3625255950 1.132892e-01
## [1168,] 0.440355309 0.2596967205 5.105149e-02
## [1169,] 0.227598100 0.4443581954 2.891855e-01
## [1170,] 0.291090430 0.4308138364 2.125348e-01
## [1171,] 0.306334128 0.4241549461 1.957638e-01
## [1172,] 0.426168977 0.1482326877 1.718640e-02
## [1173,] 0.430813836 0.2910904300 6.556091e-02
## [1174,] 0.430813836 0.2910904300 6.556091e-02
## [1175,] 0.179450170 0.4386559699 3.574234e-01
## [1176,] 0.416337988 0.3211750193 8.258786e-02
## [1177,] 0.443086838 0.2436977611 4.467792e-02
## [1178,] 0.417093250 0.1331148669 1.416116e-02
## [1179,] 0.416337988 0.3211750193 8.258786e-02
## [1180,] 0.131453291 0.0066840657 1.132892e-04
## [1181,] 0.306334128 0.4241549461 1.957638e-01
## [1182,] 0.430813836 0.2910904300 6.556091e-02
## [1183,] 0.306334128 0.4241549461 1.957638e-01
## [1184,] 0.433331375 0.1637029640 2.061445e-02
## [1185,] 0.430813836 0.2910904300 6.556091e-02
## [1186,] 0.133114867 0.4170932496 4.356307e-01
## [1187,] 0.236850055 0.0253767916 9.063140e-04
## [1188,] 0.416337988 0.3211750193 8.258786e-02
## [1189,] 0.438655970 0.1794501695 2.447048e-02
## [1190,] 0.416337988 0.3211750193 8.258786e-02
## [1191,] 0.417093250 0.1331148669 1.416116e-02
## [1192,] 0.442218287 0.1953987782 2.877966e-02
## [1193,] 0.204487093 0.0179374643 5.244873e-04
## [1194,] 0.195398778 0.4422182874 3.336033e-01
## [1195,] 0.397531973 0.3493462791 1.023338e-01
## [1196,] 0.360146521 0.0776786613 5.584740e-03
## [1197,] 0.442218287 0.1953987782 2.877966e-02
## [1198,] 0.259696720 0.4403553087 2.488965e-01
## [1199,] 0.444358195 0.2275981001 3.885821e-02
## [1200,] 0.227598100 0.4443581954 2.891855e-01
## [1201,] 0.392899701 0.1042386963 9.218388e-03
## [1202,] 0.293645732 0.0435030714 2.148300e-03
## [1203,] 0.349346279 0.3975319727 1.507880e-01
## [1204,] 0.362525595 0.3866939680 1.374912e-01
## [1205,] 0.406028666 0.1184250277 1.151354e-02
## [1206,] 0.211473264 0.4440938538 3.108657e-01
## [1207,] 0.440355309 0.2596967205 5.105149e-02
## [1208,] 0.406028666 0.1184250277 1.151354e-02
## [1209,] 0.293645732 0.0435030714 2.148300e-03
## [1210,] 0.440355309 0.2596967205 5.105149e-02
## [1211,] 0.362525595 0.3866939680 1.374912e-01
## [1212,] 0.430813836 0.2910904300 6.556091e-02
## [1213,] 0.046838810 0.0007678494 4.195898e-06
## [1214,] 0.436239133 0.2755194522 5.800410e-02
## [1215,] 0.321175019 0.4163379880 1.798991e-01
## [1216,] 0.169380014 0.0116813803 2.685375e-04
## [1217,] 0.375000000 0.3750000000 1.250000e-01
## [1218,] 0.417093250 0.1331148669 1.416116e-02
## [1219,] 0.392899701 0.1042386963 9.218388e-03
## [1220,] 0.430813836 0.2910904300 6.556091e-02
## [1221,] 0.259696720 0.4403553087 2.488965e-01
## [1222,] 0.386693968 0.3625255950 1.132892e-01
## [1223,] 0.243697761 0.4430868383 2.685375e-01
## [1224,] 0.362525595 0.3866939680 1.374912e-01
## [1225,] 0.335537578 0.4074384881 1.649156e-01
## [1226,] 0.386693968 0.3625255950 1.132892e-01
## [1227,] 0.321175019 0.4163379880 1.798991e-01
## [1228,] 0.430813836 0.2910904300 6.556091e-02
## [1229,] 0.266544426 0.0339238361 1.439193e-03
## [1230,] 0.433331375 0.1637029640 2.061445e-02
## [1231,] 0.438655970 0.1794501695 2.447048e-02
## [1232,] 0.430813836 0.2910904300 6.556091e-02
## [1233,] 0.440355309 0.2596967205 5.105149e-02
## [1234,] 0.335537578 0.4074384881 1.649156e-01
## [1235,] 0.386693968 0.3625255950 1.132892e-01
## [1236,] 0.349346279 0.3975319727 1.507880e-01
## [1237,] 0.442218287 0.1953987782 2.877966e-02
## [1238,] 0.386693968 0.3625255950 1.132892e-01
## [1239,] 0.436239133 0.2755194522 5.800410e-02
## [1240,] 0.430813836 0.2910904300 6.556091e-02
## [1241,] 0.444093854 0.2114732637 3.356718e-02
## [1242,] 0.204487093 0.0179374643 5.244873e-04
## [1243,] 0.306334128 0.4241549461 1.957638e-01
## [1244,] 0.118425028 0.4060286664 4.640328e-01
## [1245,] 0.397531973 0.3493462791 1.023338e-01
## [1246,] 0.433331375 0.1637029640 2.061445e-02
## [1247,] 0.433331375 0.1637029640 2.061445e-02
## [1248,] 0.443086838 0.2436977611 4.467792e-02
## [1249,] 0.440355309 0.2596967205 5.105149e-02
## [1250,] 0.443086838 0.2436977611 4.467792e-02
## [1251,] 0.362525595 0.3866939680 1.374912e-01
## [1252,] 0.433331375 0.1637029640 2.061445e-02
## [1253,] 0.430813836 0.2910904300 6.556091e-02
## [1254,] 0.293645732 0.0435030714 2.148300e-03
## [1255,] 0.195398778 0.4422182874 3.336033e-01
## [1256,] 0.362525595 0.3866939680 1.374912e-01
## [1257,] 0.169380014 0.0116813803 2.685375e-04
## [1258,] 0.179450170 0.4386559699 3.574234e-01
## [1259,] 0.291090430 0.4308138364 2.125348e-01
## [1260,] 0.360146521 0.0776786613 5.584740e-03
## [1261,] 0.444358195 0.2275981001 3.885821e-02
## [1262,] 0.054038972 0.3182294988 6.246727e-01
## [1263,] 0.169380014 0.0116813803 2.685375e-04
## [1264,] 0.386693968 0.3625255950 1.132892e-01
## [1265,] 0.433331375 0.1637029640 2.061445e-02
## [1266,] 0.407438488 0.3355375785 9.210835e-02
## [1267,] 0.291090430 0.4308138364 2.125348e-01
## [1268,] 0.438655970 0.1794501695 2.447048e-02
## [1269,] 0.259696720 0.4403553087 2.488965e-01
## [1270,] 0.211473264 0.4440938538 3.108657e-01
## [1271,] 0.440355309 0.2596967205 5.105149e-02
## [1272,] 0.275519452 0.4362391326 2.302373e-01
## [1273,] 0.406028666 0.1184250277 1.151354e-02
## [1274,] 0.438655970 0.1794501695 2.447048e-02
## [1275,] 0.340371253 0.0654560102 4.195898e-03
## [1276,] 0.211473264 0.4440938538 3.108657e-01
## [1277,] 0.440355309 0.2596967205 5.105149e-02
## [1278,] 0.291090430 0.4308138364 2.125348e-01
## [1279,] 0.407438488 0.3355375785 9.210835e-02
## [1280,] 0.179450170 0.4386559699 3.574234e-01
## [1281,] 0.424154946 0.3063341278 7.374710e-02
## [1282,] 0.438655970 0.1794501695 2.447048e-02
## [1283,] 0.440355309 0.2596967205 5.105149e-02
## [1284,] 0.169380014 0.0116813803 2.685375e-04
## [1285,] 0.349346279 0.3975319727 1.507880e-01
## [1286,] 0.259696720 0.4403553087 2.488965e-01
## [1287,] 0.291090430 0.4308138364 2.125348e-01
## [1288,] 0.438655970 0.1794501695 2.447048e-02
## [1289,] 0.406028666 0.1184250277 1.151354e-02
## [1290,] 0.438655970 0.1794501695 2.447048e-02
## [1291,] 0.340371253 0.0654560102 4.195898e-03
## [1292,] 0.444358195 0.2275981001 3.885821e-02
## [1293,] 0.436239133 0.2755194522 5.800410e-02
## [1294,] 0.291090430 0.4308138364 2.125348e-01
## [1295,] 0.444358195 0.2275981001 3.885821e-02
## [1296,] 0.436239133 0.2755194522 5.800410e-02
## [1297,] 0.417093250 0.1331148669 1.416116e-02
## [1298,] 0.204487093 0.0179374643 5.244873e-04
## [1299,] 0.259696720 0.4403553087 2.488965e-01
## [1300,] 0.318229499 0.0540389715 3.058810e-03
## [1301,] 0.266544426 0.0339238361 1.439193e-03
## [1302,] 0.318229499 0.0540389715 3.058810e-03
## [1303,] 0.417093250 0.1331148669 1.416116e-02
## [1304,] 0.169380014 0.0116813803 2.685375e-04
## [1305,] 0.397531973 0.3493462791 1.023338e-01
## [1306,] 0.397531973 0.3493462791 1.023338e-01
## [1307,] 0.392899701 0.1042386963 9.218388e-03
## [1308,] 0.407438488 0.3355375785 9.210835e-02
## [1309,] 0.397531973 0.3493462791 1.023338e-01
## [1310,] 0.443086838 0.2436977611 4.467792e-02
## [1311,] 0.349346279 0.3975319727 1.507880e-01
## [1312,] 0.392899701 0.1042386963 9.218388e-03
## [1313,] 0.243697761 0.4430868383 2.685375e-01
## [1314,] 0.386693968 0.3625255950 1.132892e-01
## [1315,] 0.306334128 0.4241549461 1.957638e-01
## [1316,] 0.275519452 0.4362391326 2.302373e-01
## [1317,] 0.195398778 0.4422182874 3.336033e-01
## [1318,] 0.406028666 0.1184250277 1.151354e-02
## [1319,] 0.211473264 0.4440938538 3.108657e-01
## [1320,] 0.436239133 0.2755194522 5.800410e-02
## [1321,] 0.321175019 0.4163379880 1.798991e-01
## [1322,] 0.406028666 0.1184250277 1.151354e-02
## [1323,] 0.362525595 0.3866939680 1.374912e-01
## [1324,] 0.443086838 0.2436977611 4.467792e-02
## [1325,] 0.436239133 0.2755194522 5.800410e-02
## [1326,] 0.433331375 0.1637029640 2.061445e-02
## [1327,] 0.417093250 0.1331148669 1.416116e-02
## [1328,] 0.417093250 0.1331148669 1.416116e-02
## [1329,] 0.444093854 0.2114732637 3.356718e-02
## [1330,] 0.436239133 0.2755194522 5.800410e-02
## [1331,] 0.243697761 0.4430868383 2.685375e-01
## [1332,] 0.416337988 0.3211750193 8.258786e-02
## [1333,] 0.377630828 0.0906313987 7.250512e-03
## [1334,] 0.426168977 0.1482326877 1.718640e-02
## [1335,] 0.430813836 0.2910904300 6.556091e-02
## [1336,] 0.424154946 0.3063341278 7.374710e-02
## [1337,] 0.340371253 0.0654560102 4.195898e-03
## [1338,] 0.407438488 0.3355375785 9.210835e-02
## [1339,] 0.438655970 0.1794501695 2.447048e-02
## [1340,] 0.442218287 0.1953987782 2.877966e-02
## [1341,] 0.397531973 0.3493462791 1.023338e-01
## [1342,] 0.444093854 0.2114732637 3.356718e-02
## [1343,] 0.440355309 0.2596967205 5.105149e-02
## [1344,] 0.179450170 0.4386559699 3.574234e-01
## [1345,] 0.443086838 0.2436977611 4.467792e-02
## [1346,] 0.424154946 0.3063341278 7.374710e-02
## [1347,] 0.275519452 0.4362391326 2.302373e-01
## [1348,] 0.349346279 0.3975319727 1.507880e-01
## [1349,] 0.335537578 0.4074384881 1.649156e-01
## [1350,] 0.318229499 0.0540389715 3.058810e-03
## [1351,] 0.335537578 0.4074384881 1.649156e-01
## [1352,] 0.349346279 0.3975319727 1.507880e-01
## [1353,] 0.340371253 0.0654560102 4.195898e-03
## [1354,] 0.375000000 0.3750000000 1.250000e-01
## [1355,] 0.195398778 0.4422182874 3.336033e-01
## [1356,] 0.204487093 0.0179374643 5.244873e-04
## [1357,] 0.321175019 0.4163379880 1.798991e-01
## [1358,] 0.291090430 0.4308138364 2.125348e-01
## [1359,] 0.386693968 0.3625255950 1.132892e-01
## [1360,] 0.362525595 0.3866939680 1.374912e-01
## [1361,] 0.392899701 0.1042386963 9.218388e-03
## [1362,] 0.321175019 0.4163379880 1.798991e-01
## [1363,] 0.430813836 0.2910904300 6.556091e-02
## [1364,] 0.090631399 0.0030210466 3.356718e-05
## [1365,] 0.407438488 0.3355375785 9.210835e-02
## [1366,] 0.275519452 0.4362391326 2.302373e-01
## [1367,] 0.424154946 0.3063341278 7.374710e-02
## [1368,] 0.204487093 0.0179374643 5.244873e-04
## [1369,] 0.436239133 0.2755194522 5.800410e-02
## [1370,] 0.406028666 0.1184250277 1.151354e-02
## [1371,] 0.430813836 0.2910904300 6.556091e-02
## [1372,] 0.259696720 0.4403553087 2.488965e-01
## [1373,] 0.104238696 0.3928997013 4.936432e-01
## [1374,] 0.375000000 0.3750000000 1.250000e-01
## [1375,] 0.360146521 0.0776786613 5.584740e-03
## [1376,] 0.433331375 0.1637029640 2.061445e-02
## [1377,] 0.444358195 0.2275981001 3.885821e-02
## [1378,] 0.417093250 0.1331148669 1.416116e-02
## [1379,] 0.321175019 0.4163379880 1.798991e-01
## [1380,] 0.430813836 0.2910904300 6.556091e-02
## [1381,] 0.438655970 0.1794501695 2.447048e-02
## [1382,] 0.444093854 0.2114732637 3.356718e-02
## [1383,] 0.243697761 0.4430868383 2.685375e-01
## [1384,] 0.416337988 0.3211750193 8.258786e-02
## [1385,] 0.426168977 0.1482326877 1.718640e-02
## [1386,] 0.377630828 0.0906313987 7.250512e-03
## [1387,] 0.131453291 0.0066840657 1.132892e-04
## [1388,] 0.236850055 0.0253767916 9.063140e-04
## [1389,] 0.386693968 0.3625255950 1.132892e-01
## [1390,] 0.392899701 0.1042386963 9.218388e-03
## [1391,] 0.424154946 0.3063341278 7.374710e-02
## [1392,] 0.377630828 0.0906313987 7.250512e-03
## [1393,] 0.406028666 0.1184250277 1.151354e-02
## [1394,] 0.444358195 0.2275981001 3.885821e-02
## [1395,] 0.436239133 0.2755194522 5.800410e-02
## [1396,] 0.236850055 0.0253767916 9.063140e-04
## [1397,] 0.424154946 0.3063341278 7.374710e-02
## [1398,] 0.377630828 0.0906313987 7.250512e-03
## [1399,] 0.243697761 0.4430868383 2.685375e-01
## [1400,] 0.275519452 0.4362391326 2.302373e-01
## [1401,] 0.340371253 0.0654560102 4.195898e-03
## [1402,] 0.169380014 0.0116813803 2.685375e-04
## [1403,] 0.442218287 0.1953987782 2.877966e-02
## [1404,] 0.000000000 0.0000000000 0.000000e+00
## [1405,] 0.430813836 0.2910904300 6.556091e-02
## [1406,] 0.438655970 0.1794501695 2.447048e-02
## [1407,] 0.397531973 0.3493462791 1.023338e-01
## [1408,] 0.335537578 0.4074384881 1.649156e-01
## [1409,] 0.426168977 0.1482326877 1.718640e-02
## [1410,] 0.179450170 0.4386559699 3.574234e-01
## [1411,] 0.386693968 0.3625255950 1.132892e-01
## [1412,] 0.433331375 0.1637029640 2.061445e-02
## [1413,] 0.436239133 0.2755194522 5.800410e-02
## [1414,] 0.426168977 0.1482326877 1.718640e-02
## [1415,] 0.362525595 0.3866939680 1.374912e-01
## [1416,] 0.362525595 0.3866939680 1.374912e-01
## [1417,] 0.275519452 0.4362391326 2.302373e-01
## [1418,] 0.362525595 0.3866939680 1.374912e-01
## [1419,] 0.424154946 0.3063341278 7.374710e-02
## [1420,] 0.377630828 0.0906313987 7.250512e-03
## [1421,] 0.426168977 0.1482326877 1.718640e-02
## [1422,] 0.362525595 0.3866939680 1.374912e-01
## [1423,] 0.349346279 0.3975319727 1.507880e-01
## [1424,] 0.443086838 0.2436977611 4.467792e-02
## [1425,] 0.426168977 0.1482326877 1.718640e-02
## [1426,] 0.438655970 0.1794501695 2.447048e-02
## [1427,] 0.424154946 0.3063341278 7.374710e-02
## [1428,] 0.438655970 0.1794501695 2.447048e-02
## [1429,] 0.179450170 0.4386559699 3.574234e-01
## [1430,] 0.417093250 0.1331148669 1.416116e-02
## [1431,] 0.424154946 0.3063341278 7.374710e-02
## [1432,] 0.000000000 0.0000000000 1.000000e+00
## [1433,] 0.416337988 0.3211750193 8.258786e-02
## [1434,] 0.243697761 0.4430868383 2.685375e-01
## [1435,] 0.349346279 0.3975319727 1.507880e-01
## [1436,] 0.340371253 0.0654560102 4.195898e-03
## [1437,] 0.442218287 0.1953987782 2.877966e-02
## [1438,] 0.275519452 0.4362391326 2.302373e-01
## [1439,] 0.275519452 0.4362391326 2.302373e-01
## [1440,] 0.426168977 0.1482326877 1.718640e-02
## [1441,] 0.438655970 0.1794501695 2.447048e-02
## [1442,] 0.416337988 0.3211750193 8.258786e-02
## [1443,] 0.438655970 0.1794501695 2.447048e-02
## [1444,] 0.204487093 0.0179374643 5.244873e-04
## [1445,] 0.417093250 0.1331148669 1.416116e-02
## [1446,] 0.386693968 0.3625255950 1.132892e-01
## [1447,] 0.340371253 0.0654560102 4.195898e-03
## [1448,] 0.442218287 0.1953987782 2.877966e-02
## [1449,] 0.169380014 0.0116813803 2.685375e-04
## [1450,] 0.211473264 0.4440938538 3.108657e-01
## [1451,] 0.377630828 0.0906313987 7.250512e-03
## [1452,] 0.362525595 0.3866939680 1.374912e-01
## [1453,] 0.291090430 0.4308138364 2.125348e-01
## [1454,] 0.293645732 0.0435030714 2.148300e-03
## [1455,] 0.436239133 0.2755194522 5.800410e-02
## [1456,] 0.054038972 0.3182294988 6.246727e-01
## [1457,] 0.417093250 0.1331148669 1.416116e-02
## [1458,] 0.375000000 0.3750000000 1.250000e-01
## [1459,] 0.416337988 0.3211750193 8.258786e-02
## [1460,] 0.440355309 0.2596967205 5.105149e-02
## [1461,] 0.227598100 0.4443581954 2.891855e-01
## [1462,] 0.417093250 0.1331148669 1.416116e-02
## [1463,] 0.204487093 0.0179374643 5.244873e-04
## [1464,] 0.406028666 0.1184250277 1.151354e-02
## [1465,] 0.377630828 0.0906313987 7.250512e-03
## [1466,] 0.306334128 0.4241549461 1.957638e-01
## [1467,] 0.362525595 0.3866939680 1.374912e-01
## [1468,] 0.259696720 0.4403553087 2.488965e-01
## [1469,] 0.377630828 0.0906313987 7.250512e-03
## [1470,] 0.406028666 0.1184250277 1.151354e-02
## [1471,] 0.386693968 0.3625255950 1.132892e-01
## [1472,] 0.392899701 0.1042386963 9.218388e-03
## [1473,] 0.362525595 0.3866939680 1.374912e-01
## [1474,] 0.397531973 0.3493462791 1.023338e-01
## [1475,] 0.442218287 0.1953987782 2.877966e-02
## [1476,] 0.236850055 0.0253767916 9.063140e-04
## [1477,] 0.321175019 0.4163379880 1.798991e-01
## [1478,] 0.444358195 0.2275981001 3.885821e-02
## [1479,] 0.397531973 0.3493462791 1.023338e-01
## [1480,] 0.438655970 0.1794501695 2.447048e-02
## [1481,] 0.426168977 0.1482326877 1.718640e-02
## [1482,] 0.416337988 0.3211750193 8.258786e-02
## [1483,] 0.211473264 0.4440938538 3.108657e-01
## [1484,] 0.430813836 0.2910904300 6.556091e-02
## [1485,] 0.433331375 0.1637029640 2.061445e-02
## [1486,] 0.362525595 0.3866939680 1.374912e-01
## [1487,] 0.275519452 0.4362391326 2.302373e-01
## [1488,] 0.433331375 0.1637029640 2.061445e-02
## [1489,] 0.204487093 0.0179374643 5.244873e-04
## [1490,] 0.416337988 0.3211750193 8.258786e-02
## [1491,] 0.306334128 0.4241549461 1.957638e-01
## [1492,] 0.436239133 0.2755194522 5.800410e-02
## [1493,] 0.349346279 0.3975319727 1.507880e-01
## [1494,] 0.375000000 0.3750000000 1.250000e-01
## [1495,] 0.386693968 0.3625255950 1.132892e-01
## [1496,] 0.362525595 0.3866939680 1.374912e-01
## [1497,] 0.442218287 0.1953987782 2.877966e-02
## [1498,] 0.444093854 0.2114732637 3.356718e-02
## [1499,] 0.243697761 0.4430868383 2.685375e-01
## [1500,] 0.349346279 0.3975319727 1.507880e-01
## [1501,] 0.349346279 0.3975319727 1.507880e-01
## [1502,] 0.424154946 0.3063341278 7.374710e-02
## [1503,] 0.430813836 0.2910904300 6.556091e-02
## [1504,] 0.227598100 0.4443581954 2.891855e-01
## [1505,] 0.195398778 0.4422182874 3.336033e-01
## [1506,] 0.443086838 0.2436977611 4.467792e-02
## [1507,] 0.291090430 0.4308138364 2.125348e-01
## [1508,] 0.440355309 0.2596967205 5.105149e-02
## [1509,] 0.118425028 0.4060286664 4.640328e-01
## [1510,] 0.195398778 0.4422182874 3.336033e-01
## [1511,] 0.426168977 0.1482326877 1.718640e-02
## [1512,] 0.440355309 0.2596967205 5.105149e-02
## [1513,] 0.386693968 0.3625255950 1.132892e-01
## [1514,] 0.306334128 0.4241549461 1.957638e-01
## [1515,] 0.424154946 0.3063341278 7.374710e-02
## [1516,] 0.259696720 0.4403553087 2.488965e-01
## [1517,] 0.321175019 0.4163379880 1.798991e-01
## [1518,] 0.179450170 0.4386559699 3.574234e-01
## [1519,] 0.443086838 0.2436977611 4.467792e-02
## [1520,] 0.444358195 0.2275981001 3.885821e-02
## [1521,] 0.416337988 0.3211750193 8.258786e-02
## [1522,] 0.440355309 0.2596967205 5.105149e-02
## [1523,] 0.293645732 0.0435030714 2.148300e-03
## [1524,] 0.335537578 0.4074384881 1.649156e-01
## [1525,] 0.392899701 0.1042386963 9.218388e-03
## [1526,] 0.163702964 0.4333313752 3.823512e-01
## [1527,] 0.436239133 0.2755194522 5.800410e-02
## [1528,] 0.335537578 0.4074384881 1.649156e-01
## [1529,] 0.444093854 0.2114732637 3.356718e-02
## [1530,] 0.360146521 0.0776786613 5.584740e-03
## [1531,] 0.436239133 0.2755194522 5.800410e-02
## [1532,] 0.407438488 0.3355375785 9.210835e-02
## [1533,] 0.131453291 0.0066840657 1.132892e-04
## [1534,] 0.436239133 0.2755194522 5.800410e-02
## [1535,] 0.386693968 0.3625255950 1.132892e-01
## [1536,] 0.306334128 0.4241549461 1.957638e-01
## [1537,] 0.000000000 0.0000000000 1.000000e+00
## [1538,] 0.442218287 0.1953987782 2.877966e-02
## [1539,] 0.440355309 0.2596967205 5.105149e-02
## [1540,] 0.442218287 0.1953987782 2.877966e-02
## [1541,] 0.306334128 0.4241549461 1.957638e-01
## [1542,] 0.444358195 0.2275981001 3.885821e-02
## [1543,] 0.131453291 0.0066840657 1.132892e-04
## [1544,] 0.227598100 0.4443581954 2.891855e-01
## [1545,] 0.360146521 0.0776786613 5.584740e-03
## [1546,] 0.360146521 0.0776786613 5.584740e-03
## [1547,] 0.416337988 0.3211750193 8.258786e-02
## [1548,] 0.321175019 0.4163379880 1.798991e-01
## [1549,] 0.275519452 0.4362391326 2.302373e-01
## [1550,] 0.131453291 0.0066840657 1.132892e-04
## [1551,] 0.444358195 0.2275981001 3.885821e-02
## [1552,] 0.377630828 0.0906313987 7.250512e-03
## [1553,] 0.436239133 0.2755194522 5.800410e-02
## [1554,] 0.443086838 0.2436977611 4.467792e-02
## [1555,] 0.397531973 0.3493462791 1.023338e-01
## [1556,] 0.430813836 0.2910904300 6.556091e-02
## [1557,] 0.436239133 0.2755194522 5.800410e-02
## [1558,] 0.444358195 0.2275981001 3.885821e-02
## [1559,] 0.362525595 0.3866939680 1.374912e-01
## [1560,] 0.211473264 0.4440938538 3.108657e-01
## [1561,] 0.259696720 0.4403553087 2.488965e-01
## [1562,] 0.444093854 0.2114732637 3.356718e-02
## [1563,] 0.375000000 0.3750000000 1.250000e-01
## [1564,] 0.349346279 0.3975319727 1.507880e-01
## [1565,] 0.417093250 0.1331148669 1.416116e-02
## [1566,] 0.227598100 0.4443581954 2.891855e-01
## [1567,] 0.440355309 0.2596967205 5.105149e-02
## [1568,] 0.417093250 0.1331148669 1.416116e-02
## [1569,] 0.340371253 0.0654560102 4.195898e-03
## [1570,] 0.375000000 0.3750000000 1.250000e-01
## [1571,] 0.293645732 0.0435030714 2.148300e-03
## [1572,] 0.169380014 0.0116813803 2.685375e-04
## [1573,] 0.397531973 0.3493462791 1.023338e-01
## [1574,] 0.227598100 0.4443581954 2.891855e-01
## [1575,] 0.416337988 0.3211750193 8.258786e-02
## [1576,] 0.444358195 0.2275981001 3.885821e-02
## [1577,] 0.438655970 0.1794501695 2.447048e-02
## [1578,] 0.195398778 0.4422182874 3.336033e-01
## [1579,] 0.426168977 0.1482326877 1.718640e-02
## [1580,] 0.335537578 0.4074384881 1.649156e-01
## [1581,] 0.417093250 0.1331148669 1.416116e-02
## [1582,] 0.438655970 0.1794501695 2.447048e-02
## [1583,] 0.444358195 0.2275981001 3.885821e-02
## [1584,] 0.227598100 0.4443581954 2.891855e-01
## [1585,] 0.443086838 0.2436977611 4.467792e-02
## [1586,] 0.375000000 0.3750000000 1.250000e-01
## [1587,] 0.444358195 0.2275981001 3.885821e-02
## [1588,] 0.443086838 0.2436977611 4.467792e-02
## [1589,] 0.204487093 0.0179374643 5.244873e-04
## [1590,] 0.046838810 0.0007678494 4.195898e-06
## [1591,] 0.397531973 0.3493462791 1.023338e-01
## [1592,] 0.430813836 0.2910904300 6.556091e-02
## [1593,] 0.443086838 0.2436977611 4.467792e-02
## [1594,] 0.444093854 0.2114732637 3.356718e-02
## [1595,] 0.163702964 0.4333313752 3.823512e-01
## [1596,] 0.416337988 0.3211750193 8.258786e-02
## [1597,] 0.442218287 0.1953987782 2.877966e-02
## [1598,] 0.440355309 0.2596967205 5.105149e-02
## [1599,] 0.416337988 0.3211750193 8.258786e-02
## [1600,] 0.169380014 0.0116813803 2.685375e-04
## [1601,] 0.243697761 0.4430868383 2.685375e-01
## [1602,] 0.424154946 0.3063341278 7.374710e-02
## [1603,] 0.443086838 0.2436977611 4.467792e-02
## [1604,] 0.417093250 0.1331148669 1.416116e-02
## [1605,] 0.433331375 0.1637029640 2.061445e-02
## [1606,] 0.163702964 0.4333313752 3.823512e-01
## [1607,] 0.440355309 0.2596967205 5.105149e-02
## [1608,] 0.416337988 0.3211750193 8.258786e-02
## [1609,] 0.433331375 0.1637029640 2.061445e-02
## [1610,] 0.335537578 0.4074384881 1.649156e-01
## [1611,] 0.397531973 0.3493462791 1.023338e-01
## [1612,] 0.443086838 0.2436977611 4.467792e-02
## [1613,] 0.386693968 0.3625255950 1.132892e-01
## [1614,] 0.360146521 0.0776786613 5.584740e-03
## [1615,] 0.375000000 0.3750000000 1.250000e-01
## [1616,] 0.406028666 0.1184250277 1.151354e-02
## [1617,] 0.440355309 0.2596967205 5.105149e-02
## [1618,] 0.243697761 0.4430868383 2.685375e-01
## [1619,] 0.440355309 0.2596967205 5.105149e-02
## [1620,] 0.426168977 0.1482326877 1.718640e-02
## [1621,] 0.430813836 0.2910904300 6.556091e-02
## [1622,] 0.407438488 0.3355375785 9.210835e-02
## [1623,] 0.433331375 0.1637029640 2.061445e-02
## [1624,] 0.436239133 0.2755194522 5.800410e-02
## [1625,] 0.397531973 0.3493462791 1.023338e-01
## [1626,] 0.416337988 0.3211750193 8.258786e-02
## [1627,] 0.426168977 0.1482326877 1.718640e-02
## [1628,] 0.259696720 0.4403553087 2.488965e-01
## [1629,] 0.349346279 0.3975319727 1.507880e-01
## [1630,] 0.318229499 0.0540389715 3.058810e-03
## [1631,] 0.426168977 0.1482326877 1.718640e-02
## [1632,] 0.386693968 0.3625255950 1.132892e-01
## [1633,] 0.204487093 0.0179374643 5.244873e-04
## [1634,] 0.440355309 0.2596967205 5.105149e-02
## [1635,] 0.375000000 0.3750000000 1.250000e-01
## [1636,] 0.397531973 0.3493462791 1.023338e-01
## [1637,] 0.362525595 0.3866939680 1.374912e-01
## [1638,] 0.291090430 0.4308138364 2.125348e-01
## [1639,] 0.416337988 0.3211750193 8.258786e-02
## [1640,] 0.169380014 0.0116813803 2.685375e-04
## [1641,] 0.436239133 0.2755194522 5.800410e-02
## [1642,] 0.397531973 0.3493462791 1.023338e-01
## [1643,] 0.386693968 0.3625255950 1.132892e-01
## [1644,] 0.349346279 0.3975319727 1.507880e-01
## [1645,] 0.243697761 0.4430868383 2.685375e-01
## [1646,] 0.406028666 0.1184250277 1.151354e-02
## [1647,] 0.375000000 0.3750000000 1.250000e-01
## [1648,] 0.033923836 0.2665444262 6.980925e-01
## [1649,] 0.000000000 0.0000000000 0.000000e+00
## [1650,] 0.340371253 0.0654560102 4.195898e-03
## [1651,] 0.349346279 0.3975319727 1.507880e-01
## [1652,] 0.424154946 0.3063341278 7.374710e-02
## [1653,] 0.424154946 0.3063341278 7.374710e-02
## [1654,] 0.386693968 0.3625255950 1.132892e-01
## [1655,] 0.179450170 0.4386559699 3.574234e-01
## [1656,] 0.306334128 0.4241549461 1.957638e-01
## [1657,] 0.386693968 0.3625255950 1.132892e-01
## [1658,] 0.033923836 0.2665444262 6.980925e-01
## [1659,] 0.377630828 0.0906313987 7.250512e-03
## [1660,] 0.440355309 0.2596967205 5.105149e-02
## [1661,] 0.443086838 0.2436977611 4.467792e-02
## [1662,] 0.306334128 0.4241549461 1.957638e-01
## [1663,] 0.417093250 0.1331148669 1.416116e-02
## [1664,] 0.392899701 0.1042386963 9.218388e-03
## [1665,] 0.416337988 0.3211750193 8.258786e-02
## [1666,] 0.443086838 0.2436977611 4.467792e-02
## [1667,] 0.392899701 0.1042386963 9.218388e-03
## [1668,] 0.046838810 0.0007678494 4.195898e-06
## [1669,] 0.430813836 0.2910904300 6.556091e-02
## [1670,] 0.275519452 0.4362391326 2.302373e-01
## [1671,] 0.375000000 0.3750000000 1.250000e-01
## [1672,] 0.436239133 0.2755194522 5.800410e-02
## [1673,] 0.318229499 0.0540389715 3.058810e-03
## [1674,] 0.426168977 0.1482326877 1.718640e-02
## [1675,] 0.397531973 0.3493462791 1.023338e-01
## [1676,] 0.433331375 0.1637029640 2.061445e-02
## [1677,] 0.417093250 0.1331148669 1.416116e-02
## [1678,] 0.433331375 0.1637029640 2.061445e-02
## [1679,] 0.443086838 0.2436977611 4.467792e-02
## [1680,] 0.321175019 0.4163379880 1.798991e-01
## [1681,] 0.426168977 0.1482326877 1.718640e-02
## [1682,] 0.407438488 0.3355375785 9.210835e-02
## [1683,] 0.424154946 0.3063341278 7.374710e-02
## [1684,] 0.444093854 0.2114732637 3.356718e-02
## [1685,] 0.438655970 0.1794501695 2.447048e-02
## [1686,] 0.318229499 0.0540389715 3.058810e-03
## [1687,] 0.417093250 0.1331148669 1.416116e-02
## [1688,] 0.275519452 0.4362391326 2.302373e-01
## [1689,] 0.417093250 0.1331148669 1.416116e-02
## [1690,] 0.406028666 0.1184250277 1.151354e-02
## [1691,] 0.444358195 0.2275981001 3.885821e-02
## [1692,] 0.321175019 0.4163379880 1.798991e-01
## [1693,] 0.438655970 0.1794501695 2.447048e-02
## [1694,] 0.443086838 0.2436977611 4.467792e-02
## [1695,] 0.349346279 0.3975319727 1.507880e-01
## [1696,] 0.443086838 0.2436977611 4.467792e-02
## [1697,] 0.275519452 0.4362391326 2.302373e-01
## [1698,] 0.362525595 0.3866939680 1.374912e-01
## [1699,] 0.375000000 0.3750000000 1.250000e-01
## [1700,] 0.406028666 0.1184250277 1.151354e-02
## [1701,] 0.386693968 0.3625255950 1.132892e-01
## [1702,] 0.406028666 0.1184250277 1.151354e-02
## [1703,] 0.377630828 0.0906313987 7.250512e-03
## [1704,] 0.377630828 0.0906313987 7.250512e-03
## [1705,] 0.417093250 0.1331148669 1.416116e-02
## [1706,] 0.275519452 0.4362391326 2.302373e-01
## [1707,] 0.407438488 0.3355375785 9.210835e-02
## [1708,] 0.375000000 0.3750000000 1.250000e-01
## [1709,] 0.236850055 0.0253767916 9.063140e-04
## [1710,] 0.386693968 0.3625255950 1.132892e-01
## [1711,] 0.321175019 0.4163379880 1.798991e-01
## [1712,] 0.426168977 0.1482326877 1.718640e-02
## [1713,] 0.275519452 0.4362391326 2.302373e-01
## [1714,] 0.443086838 0.2436977611 4.467792e-02
## [1715,] 0.266544426 0.0339238361 1.439193e-03
## [1716,] 0.433331375 0.1637029640 2.061445e-02
## [1717,] 0.443086838 0.2436977611 4.467792e-02
## [1718,] 0.362525595 0.3866939680 1.374912e-01
## [1719,] 0.386693968 0.3625255950 1.132892e-01
## [1720,] 0.443086838 0.2436977611 4.467792e-02
## [1721,] 0.416337988 0.3211750193 8.258786e-02
## [1722,] 0.377630828 0.0906313987 7.250512e-03
## [1723,] 0.426168977 0.1482326877 1.718640e-02
## [1724,] 0.406028666 0.1184250277 1.151354e-02
## [1725,] 0.321175019 0.4163379880 1.798991e-01
## [1726,] 0.406028666 0.1184250277 1.151354e-02
## [1727,] 0.444358195 0.2275981001 3.885821e-02
## [1728,] 0.349346279 0.3975319727 1.507880e-01
## [1729,] 0.118425028 0.4060286664 4.640328e-01
## [1730,] 0.438655970 0.1794501695 2.447048e-02
## [1731,] 0.416337988 0.3211750193 8.258786e-02
## [1732,] 0.442218287 0.1953987782 2.877966e-02
## [1733,] 0.375000000 0.3750000000 1.250000e-01
## [1734,] 0.321175019 0.4163379880 1.798991e-01
## [1735,] 0.118425028 0.4060286664 4.640328e-01
## [1736,] 0.243697761 0.4430868383 2.685375e-01
## [1737,] 0.306334128 0.4241549461 1.957638e-01
## [1738,] 0.236850055 0.0253767916 9.063140e-04
## [1739,] 0.179450170 0.4386559699 3.574234e-01
## [1740,] 0.163702964 0.4333313752 3.823512e-01
## [1741,] 0.416337988 0.3211750193 8.258786e-02
## [1742,] 0.204487093 0.0179374643 5.244873e-04
## [1743,] 0.392899701 0.1042386963 9.218388e-03
## [1744,] 0.424154946 0.3063341278 7.374710e-02
## [1745,] 0.430813836 0.2910904300 6.556091e-02
## [1746,] 0.386693968 0.3625255950 1.132892e-01
## [1747,] 0.291090430 0.4308138364 2.125348e-01
## [1748,] 0.416337988 0.3211750193 8.258786e-02
## [1749,] 0.386693968 0.3625255950 1.132892e-01
## [1750,] 0.163702964 0.4333313752 3.823512e-01
## [1751,] 0.259696720 0.4403553087 2.488965e-01
## [1752,] 0.077678661 0.3601465208 5.565901e-01
## [1753,] 0.392899701 0.1042386963 9.218388e-03
## [1754,] 0.430813836 0.2910904300 6.556091e-02
## [1755,] 0.046838810 0.0007678494 4.195898e-06
## [1756,] 0.424154946 0.3063341278 7.374710e-02
## [1757,] 0.360146521 0.0776786613 5.584740e-03
## [1758,] 0.293645732 0.0435030714 2.148300e-03
## [1759,] 0.442218287 0.1953987782 2.877966e-02
## [1760,] 0.377630828 0.0906313987 7.250512e-03
## [1761,] 0.424154946 0.3063341278 7.374710e-02
## [1762,] 0.386693968 0.3625255950 1.132892e-01
## [1763,] 0.442218287 0.1953987782 2.877966e-02
## [1764,] 0.377630828 0.0906313987 7.250512e-03
## [1765,] 0.407438488 0.3355375785 9.210835e-02
## [1766,] 0.442218287 0.1953987782 2.877966e-02
## [1767,] 0.243697761 0.4430868383 2.685375e-01
## [1768,] 0.335537578 0.4074384881 1.649156e-01
## [1769,] 0.436239133 0.2755194522 5.800410e-02
## [1770,] 0.407438488 0.3355375785 9.210835e-02
## [1771,] 0.430813836 0.2910904300 6.556091e-02
## [1772,] 0.438655970 0.1794501695 2.447048e-02
## [1773,] 0.443086838 0.2436977611 4.467792e-02
## [1774,] 0.090631399 0.0030210466 3.356718e-05
## [1775,] 0.406028666 0.1184250277 1.151354e-02
## [1776,] 0.392899701 0.1042386963 9.218388e-03
## [1777,] 0.340371253 0.0654560102 4.195898e-03
## [1778,] 0.440355309 0.2596967205 5.105149e-02
## [1779,] 0.436239133 0.2755194522 5.800410e-02
## [1780,] 0.046838810 0.0007678494 4.195898e-06
## [1781,] 0.148232688 0.4261689772 4.084119e-01
## [1782,] 0.442218287 0.1953987782 2.877966e-02
## [1783,] 0.236850055 0.0253767916 9.063140e-04
## [1784,] 0.293645732 0.0435030714 2.148300e-03
## [1785,] 0.424154946 0.3063341278 7.374710e-02
## [1786,] 0.444358195 0.2275981001 3.885821e-02
## [1787,] 0.321175019 0.4163379880 1.798991e-01
## [1788,] 0.436239133 0.2755194522 5.800410e-02
## [1789,] 0.424154946 0.3063341278 7.374710e-02
## [1790,] 0.266544426 0.0339238361 1.439193e-03
## [1791,] 0.407438488 0.3355375785 9.210835e-02
## [1792,] 0.377630828 0.0906313987 7.250512e-03
## [1793,] 0.444093854 0.2114732637 3.356718e-02
## [1794,] 0.362525595 0.3866939680 1.374912e-01
## [1795,] 0.204487093 0.0179374643 5.244873e-04
## [1796,] 0.407438488 0.3355375785 9.210835e-02
## [1797,] 0.195398778 0.4422182874 3.336033e-01
## [1798,] 0.227598100 0.4443581954 2.891855e-01
## [1799,] 0.259696720 0.4403553087 2.488965e-01
## [1800,] 0.266544426 0.0339238361 1.439193e-03
## [1801,] 0.386693968 0.3625255950 1.132892e-01
## [1802,] 0.335537578 0.4074384881 1.649156e-01
## [1803,] 0.424154946 0.3063341278 7.374710e-02
## [1804,] 0.443086838 0.2436977611 4.467792e-02
## [1805,] 0.430813836 0.2910904300 6.556091e-02
## [1806,] 0.430813836 0.2910904300 6.556091e-02
## [1807,] 0.436239133 0.2755194522 5.800410e-02
## [1808,] 0.438655970 0.1794501695 2.447048e-02
## [1809,] 0.438655970 0.1794501695 2.447048e-02
## [1810,] 0.054038972 0.3182294988 6.246727e-01
## [1811,] 0.090631399 0.0030210466 3.356718e-05
## [1812,] 0.204487093 0.0179374643 5.244873e-04
## [1813,] 0.436239133 0.2755194522 5.800410e-02
## [1814,] 0.440355309 0.2596967205 5.105149e-02
## [1815,] 0.318229499 0.0540389715 3.058810e-03
## [1816,] 0.360146521 0.0776786613 5.584740e-03
## [1817,] 0.169380014 0.0116813803 2.685375e-04
## [1818,] 0.444358195 0.2275981001 3.885821e-02
## [1819,] 0.362525595 0.3866939680 1.374912e-01
## [1820,] 0.436239133 0.2755194522 5.800410e-02
## [1821,] 0.444093854 0.2114732637 3.356718e-02
## [1822,] 0.291090430 0.4308138364 2.125348e-01
## [1823,] 0.397531973 0.3493462791 1.023338e-01
## [1824,] 0.335537578 0.4074384881 1.649156e-01
## [1825,] 0.275519452 0.4362391326 2.302373e-01
## [1826,] 0.377630828 0.0906313987 7.250512e-03
## [1827,] 0.407438488 0.3355375785 9.210835e-02
## [1828,] 0.430813836 0.2910904300 6.556091e-02
## [1829,] 0.077678661 0.3601465208 5.565901e-01
## [1830,] 0.090631399 0.3776308281 5.244873e-01
## [1831,] 0.444358195 0.2275981001 3.885821e-02
## [1832,] 0.118425028 0.4060286664 4.640328e-01
## [1833,] 0.377630828 0.0906313987 7.250512e-03
## [1834,] 0.375000000 0.3750000000 1.250000e-01
## [1835,] 0.306334128 0.4241549461 1.957638e-01
## [1836,] 0.386693968 0.3625255950 1.132892e-01
## [1837,] 0.442218287 0.1953987782 2.877966e-02
## [1838,] 0.407438488 0.3355375785 9.210835e-02
## [1839,] 0.321175019 0.4163379880 1.798991e-01
## [1840,] 0.000000000 0.0000000000 0.000000e+00
## [1841,] 0.375000000 0.3750000000 1.250000e-01
## [1842,] 0.444358195 0.2275981001 3.885821e-02
## [1843,] 0.443086838 0.2436977611 4.467792e-02
## [1844,] 0.442218287 0.1953987782 2.877966e-02
## [1845,] 0.236850055 0.0253767916 9.063140e-04
## [1846,] 0.433331375 0.1637029640 2.061445e-02
## [1847,] 0.424154946 0.3063341278 7.374710e-02
## [1848,] 0.443086838 0.2436977611 4.467792e-02
## [1849,] 0.444358195 0.2275981001 3.885821e-02
## [1850,] 0.436239133 0.2755194522 5.800410e-02
## [1851,] 0.442218287 0.1953987782 2.877966e-02
## [1852,] 0.243697761 0.4430868383 2.685375e-01
## [1853,] 0.443086838 0.2436977611 4.467792e-02
## [1854,] 0.318229499 0.0540389715 3.058810e-03
## [1855,] 0.392899701 0.1042386963 9.218388e-03
## [1856,] 0.424154946 0.3063341278 7.374710e-02
## [1857,] 0.444093854 0.2114732637 3.356718e-02
## [1858,] 0.440355309 0.2596967205 5.105149e-02
## [1859,] 0.291090430 0.4308138364 2.125348e-01
## [1860,] 0.444093854 0.2114732637 3.356718e-02
## [1861,] 0.417093250 0.1331148669 1.416116e-02
## [1862,] 0.430813836 0.2910904300 6.556091e-02
## [1863,] 0.266544426 0.0339238361 1.439193e-03
## [1864,] 0.443086838 0.2436977611 4.467792e-02
## [1865,] 0.430813836 0.2910904300 6.556091e-02
## [1866,] 0.436239133 0.2755194522 5.800410e-02
## [1867,] 0.444093854 0.2114732637 3.356718e-02
## [1868,] 0.424154946 0.3063341278 7.374710e-02
## [1869,] 0.046838810 0.0007678494 4.195898e-06
## [1870,] 0.424154946 0.3063341278 7.374710e-02
## [1871,] 0.406028666 0.1184250277 1.151354e-02
## [1872,] 0.433331375 0.1637029640 2.061445e-02
## [1873,] 0.426168977 0.1482326877 1.718640e-02
## [1874,] 0.211473264 0.4440938538 3.108657e-01
## [1875,] 0.306334128 0.4241549461 1.957638e-01
## [1876,] 0.392899701 0.1042386963 9.218388e-03
## [1877,] 0.397531973 0.3493462791 1.023338e-01
## [1878,] 0.433331375 0.1637029640 2.061445e-02
## [1879,] 0.433331375 0.1637029640 2.061445e-02
## [1880,] 0.442218287 0.1953987782 2.877966e-02
## [1881,] 0.318229499 0.0540389715 3.058810e-03
## [1882,] 0.148232688 0.4261689772 4.084119e-01
## [1883,] 0.335537578 0.4074384881 1.649156e-01
## [1884,] 0.293645732 0.0435030714 2.148300e-03
## [1885,] 0.440355309 0.2596967205 5.105149e-02
## [1886,] 0.169380014 0.0116813803 2.685375e-04
## [1887,] 0.407438488 0.3355375785 9.210835e-02
## [1888,] 0.444358195 0.2275981001 3.885821e-02
## [1889,] 0.204487093 0.0179374643 5.244873e-04
## [1890,] 0.375000000 0.3750000000 1.250000e-01
## [1891,] 0.424154946 0.3063341278 7.374710e-02
## [1892,] 0.090631399 0.0030210466 3.356718e-05
## [1893,] 0.430813836 0.2910904300 6.556091e-02
## [1894,] 0.436239133 0.2755194522 5.800410e-02
## [1895,] 0.417093250 0.1331148669 1.416116e-02
## [1896,] 0.179450170 0.4386559699 3.574234e-01
## [1897,] 0.430813836 0.2910904300 6.556091e-02
## [1898,] 0.407438488 0.3355375785 9.210835e-02
## [1899,] 0.000000000 0.0000000000 0.000000e+00
## [1900,] 0.430813836 0.2910904300 6.556091e-02
## [1901,] 0.424154946 0.3063341278 7.374710e-02
## [1902,] 0.204487093 0.0179374643 5.244873e-04
## [1903,] 0.438655970 0.1794501695 2.447048e-02
## [1904,] 0.443086838 0.2436977611 4.467792e-02
## [1905,] 0.293645732 0.0435030714 2.148300e-03
## [1906,] 0.293645732 0.0435030714 2.148300e-03
## [1907,] 0.397531973 0.3493462791 1.023338e-01
## [1908,] 0.243697761 0.4430868383 2.685375e-01
## [1909,] 0.259696720 0.4403553087 2.488965e-01
## [1910,] 0.377630828 0.0906313987 7.250512e-03
## [1911,] 0.424154946 0.3063341278 7.374710e-02
## [1912,] 0.360146521 0.0776786613 5.584740e-03
## [1913,] 0.442218287 0.1953987782 2.877966e-02
## [1914,] 0.426168977 0.1482326877 1.718640e-02
## [1915,] 0.362525595 0.3866939680 1.374912e-01
## [1916,] 0.444093854 0.2114732637 3.356718e-02
## [1917,] 0.291090430 0.4308138364 2.125348e-01
## [1918,] 0.444358195 0.2275981001 3.885821e-02
## [1919,] 0.291090430 0.4308138364 2.125348e-01
## [1920,] 0.436239133 0.2755194522 5.800410e-02
## [1921,] 0.444358195 0.2275981001 3.885821e-02
## [1922,] 0.397531973 0.3493462791 1.023338e-01
## [1923,] 0.443086838 0.2436977611 4.467792e-02
## [1924,] 0.349346279 0.3975319727 1.507880e-01
## [1925,] 0.340371253 0.0654560102 4.195898e-03
## [1926,] 0.321175019 0.4163379880 1.798991e-01
## [1927,] 0.306334128 0.4241549461 1.957638e-01
## [1928,] 0.349346279 0.3975319727 1.507880e-01
## [1929,] 0.417093250 0.1331148669 1.416116e-02
## [1930,] 0.291090430 0.4308138364 2.125348e-01
## [1931,] 0.424154946 0.3063341278 7.374710e-02
## [1932,] 0.443086838 0.2436977611 4.467792e-02
## [1933,] 0.293645732 0.0435030714 2.148300e-03
## [1934,] 0.430813836 0.2910904300 6.556091e-02
## [1935,] 0.430813836 0.2910904300 6.556091e-02
## [1936,] 0.424154946 0.3063341278 7.374710e-02
## [1937,] 0.426168977 0.1482326877 1.718640e-02
## [1938,] 0.349346279 0.3975319727 1.507880e-01
## [1939,] 0.436239133 0.2755194522 5.800410e-02
## [1940,] 0.211473264 0.4440938538 3.108657e-01
## [1941,] 0.438655970 0.1794501695 2.447048e-02
## [1942,] 0.211473264 0.4440938538 3.108657e-01
## [1943,] 0.169380014 0.0116813803 2.685375e-04
## [1944,] 0.440355309 0.2596967205 5.105149e-02
## [1945,] 0.275519452 0.4362391326 2.302373e-01
## [1946,] 0.375000000 0.3750000000 1.250000e-01
## [1947,] 0.416337988 0.3211750193 8.258786e-02
## [1948,] 0.335537578 0.4074384881 1.649156e-01
## [1949,] 0.377630828 0.0906313987 7.250512e-03
## [1950,] 0.360146521 0.0776786613 5.584740e-03
## [1951,] 0.204487093 0.0179374643 5.244873e-04
## [1952,] 0.386693968 0.3625255950 1.132892e-01
## [1953,] 0.424154946 0.3063341278 7.374710e-02
## [1954,] 0.179450170 0.4386559699 3.574234e-01
## [1955,] 0.417093250 0.1331148669 1.416116e-02
## [1956,] 0.349346279 0.3975319727 1.507880e-01
## [1957,] 0.204487093 0.0179374643 5.244873e-04
## [1958,] 0.397531973 0.3493462791 1.023338e-01
## [1959,] 0.426168977 0.1482326877 1.718640e-02
## [1960,] 0.426168977 0.1482326877 1.718640e-02
## [1961,] 0.430813836 0.2910904300 6.556091e-02
## [1962,] 0.443086838 0.2436977611 4.467792e-02
## [1963,] 0.321175019 0.4163379880 1.798991e-01
## [1964,] 0.406028666 0.1184250277 1.151354e-02
## [1965,] 0.386693968 0.3625255950 1.132892e-01
## [1966,] 0.443086838 0.2436977611 4.467792e-02
## [1967,] 0.430813836 0.2910904300 6.556091e-02
## [1968,] 0.275519452 0.4362391326 2.302373e-01
## [1969,] 0.291090430 0.4308138364 2.125348e-01
## [1970,] 0.444093854 0.2114732637 3.356718e-02
## [1971,] 0.443086838 0.2436977611 4.467792e-02
## [1972,] 0.444358195 0.2275981001 3.885821e-02
## [1973,] 0.362525595 0.3866939680 1.374912e-01
## [1974,] 0.377630828 0.0906313987 7.250512e-03
## [1975,] 0.275519452 0.4362391326 2.302373e-01
## [1976,] 0.430813836 0.2910904300 6.556091e-02
## [1977,] 0.430813836 0.2910904300 6.556091e-02
## [1978,] 0.104238696 0.3928997013 4.936432e-01
## [1979,] 0.362525595 0.3866939680 1.374912e-01
## [1980,] 0.227598100 0.4443581954 2.891855e-01
## [1981,] 0.349346279 0.3975319727 1.507880e-01
## [1982,] 0.306334128 0.4241549461 1.957638e-01
## [1983,] 0.025376792 0.2368500554 7.368668e-01
## [1984,] 0.335537578 0.4074384881 1.649156e-01
## [1985,] 0.442218287 0.1953987782 2.877966e-02
## [1986,] 0.266544426 0.0339238361 1.439193e-03
## [1987,] 0.118425028 0.4060286664 4.640328e-01
## [1988,] 0.397531973 0.3493462791 1.023338e-01
## [1989,] 0.424154946 0.3063341278 7.374710e-02
## [1990,] 0.442218287 0.1953987782 2.877966e-02
## [1991,] 0.406028666 0.1184250277 1.151354e-02
## [1992,] 0.430813836 0.2910904300 6.556091e-02
## [1993,] 0.293645732 0.0435030714 2.148300e-03
## [1994,] 0.444358195 0.2275981001 3.885821e-02
## [1995,] 0.416337988 0.3211750193 8.258786e-02
## [1996,] 0.443086838 0.2436977611 4.467792e-02
## [1997,] 0.349346279 0.3975319727 1.507880e-01
## [1998,] 0.335537578 0.4074384881 1.649156e-01
## [1999,] 0.430813836 0.2910904300 6.556091e-02
## [2000,] 0.340371253 0.0654560102 4.195898e-03
## [2001,] 0.293645732 0.0435030714 2.148300e-03
## [2002,] 0.416337988 0.3211750193 8.258786e-02
## [2003,] 0.426168977 0.1482326877 1.718640e-02
## [2004,] 0.033923836 0.2665444262 6.980925e-01
## [2005,] 0.392899701 0.1042386963 9.218388e-03
## [2006,] 0.360146521 0.0776786613 5.584740e-03
## [2007,] 0.443086838 0.2436977611 4.467792e-02
## [2008,] 0.436239133 0.2755194522 5.800410e-02
## [2009,] 0.362525595 0.3866939680 1.374912e-01
## [2010,] 0.349346279 0.3975319727 1.507880e-01
## [2011,] 0.266544426 0.0339238361 1.439193e-03
## [2012,] 0.321175019 0.4163379880 1.798991e-01
## [2013,] 0.443086838 0.2436977611 4.467792e-02
## [2014,] 0.424154946 0.3063341278 7.374710e-02
## [2015,] 0.417093250 0.1331148669 1.416116e-02
## [2016,] 0.360146521 0.0776786613 5.584740e-03
## [2017,] 0.318229499 0.0540389715 3.058810e-03
## [2018,] 0.443086838 0.2436977611 4.467792e-02
## [2019,] 0.438655970 0.1794501695 2.447048e-02
## [2020,] 0.275519452 0.4362391326 2.302373e-01
## [2021,] 0.426168977 0.1482326877 1.718640e-02
## [2022,] 0.195398778 0.4422182874 3.336033e-01
## [2023,] 0.444093854 0.2114732637 3.356718e-02
## [2024,] 0.291090430 0.4308138364 2.125348e-01
## [2025,] 0.236850055 0.0253767916 9.063140e-04
## [2026,] 0.169380014 0.0116813803 2.685375e-04
## [2027,] 0.444093854 0.2114732637 3.356718e-02
## [2028,] 0.360146521 0.0776786613 5.584740e-03
## [2029,] 0.377630828 0.0906313987 7.250512e-03
## [2030,] 0.444093854 0.2114732637 3.356718e-02
## [2031,] 0.375000000 0.3750000000 1.250000e-01
## [2032,] 0.054038972 0.3182294988 6.246727e-01
## [2033,] 0.406028666 0.1184250277 1.151354e-02
## [2034,] 0.406028666 0.1184250277 1.151354e-02
## [2035,] 0.443086838 0.2436977611 4.467792e-02
## [2036,] 0.266544426 0.0339238361 1.439193e-03
## [2037,] 0.438655970 0.1794501695 2.447048e-02
## [2038,] 0.227598100 0.4443581954 2.891855e-01
## [2039,] 0.375000000 0.3750000000 1.250000e-01
## [2040,] 0.436239133 0.2755194522 5.800410e-02
## [2041,] 0.227598100 0.4443581954 2.891855e-01
## [2042,] 0.318229499 0.0540389715 3.058810e-03
## [2043,] 0.377630828 0.0906313987 7.250512e-03
## [2044,] 0.306334128 0.4241549461 1.957638e-01
## [2045,] 0.426168977 0.1482326877 1.718640e-02
## [2046,] 0.397531973 0.3493462791 1.023338e-01
## [2047,] 0.360146521 0.0776786613 5.584740e-03
## [2048,] 0.440355309 0.2596967205 5.105149e-02
## [2049,] 0.377630828 0.0906313987 7.250512e-03
## [2050,] 0.433331375 0.1637029640 2.061445e-02
## [2051,] 0.169380014 0.0116813803 2.685375e-04
## [2052,] 0.442218287 0.1953987782 2.877966e-02
## [2053,] 0.179450170 0.4386559699 3.574234e-01
## [2054,] 0.397531973 0.3493462791 1.023338e-01
## [2055,] 0.349346279 0.3975319727 1.507880e-01
## [2056,] 0.397531973 0.3493462791 1.023338e-01
## [2057,] 0.340371253 0.0654560102 4.195898e-03
## [2058,] 0.436239133 0.2755194522 5.800410e-02
## [2059,] 0.406028666 0.1184250277 1.151354e-02
## [2060,] 0.426168977 0.1482326877 1.718640e-02
## [2061,] 0.444358195 0.2275981001 3.885821e-02
## [2062,] 0.424154946 0.3063341278 7.374710e-02
## [2063,] 0.444093854 0.2114732637 3.356718e-02
## [2064,] 0.386693968 0.3625255950 1.132892e-01
## [2065,] 0.443086838 0.2436977611 4.467792e-02
## [2066,] 0.318229499 0.0540389715 3.058810e-03
## [2067,] 0.436239133 0.2755194522 5.800410e-02
## [2068,] 0.377630828 0.0906313987 7.250512e-03
## [2069,] 0.360146521 0.0776786613 5.584740e-03
## [2070,] 0.386693968 0.3625255950 1.132892e-01
## [2071,] 0.275519452 0.4362391326 2.302373e-01
## [2072,] 0.424154946 0.3063341278 7.374710e-02
## [2073,] 0.266544426 0.0339238361 1.439193e-03
## [2074,] 0.349346279 0.3975319727 1.507880e-01
## [2075,] 0.362525595 0.3866939680 1.374912e-01
## [2076,] 0.426168977 0.1482326877 1.718640e-02
## [2077,] 0.377630828 0.0906313987 7.250512e-03
## [2078,] 0.426168977 0.1482326877 1.718640e-02
## [2079,] 0.436239133 0.2755194522 5.800410e-02
## [2080,] 0.362525595 0.3866939680 1.374912e-01
## [2081,] 0.360146521 0.0776786613 5.584740e-03
## [2082,] 0.169380014 0.0116813803 2.685375e-04
## [2083,] 0.306334128 0.4241549461 1.957638e-01
## [2084,] 0.407438488 0.3355375785 9.210835e-02
## [2085,] 0.433331375 0.1637029640 2.061445e-02
## [2086,] 0.321175019 0.4163379880 1.798991e-01
## [2087,] 0.195398778 0.4422182874 3.336033e-01
## [2088,] 0.443086838 0.2436977611 4.467792e-02
## [2089,] 0.335537578 0.4074384881 1.649156e-01
## [2090,] 0.443086838 0.2436977611 4.467792e-02
## [2091,] 0.275519452 0.4362391326 2.302373e-01
## [2092,] 0.444358195 0.2275981001 3.885821e-02
## [2093,] 0.243697761 0.4430868383 2.685375e-01
## [2094,] 0.349346279 0.3975319727 1.507880e-01
## [2095,] 0.406028666 0.1184250277 1.151354e-02
## [2096,] 0.362525595 0.3866939680 1.374912e-01
## [2097,] 0.293645732 0.0435030714 2.148300e-03
## [2098,] 0.433331375 0.1637029640 2.061445e-02
## [2099,] 0.392899701 0.1042386963 9.218388e-03
## [2100,] 0.318229499 0.0540389715 3.058810e-03
## [2101,] 0.318229499 0.0540389715 3.058810e-03
## [2102,] 0.291090430 0.4308138364 2.125348e-01
## attr(,"degree")
## [1] 3
## attr(,"knots")
## numeric(0)
## attr(,"Boundary.knots")
## [1] 18 80
## attr(,"intercept")
## [1] FALSE
## attr(,"class")
## [1] "bs" "basis" "matrix"
# So in this case, we pass at a single variable, in this case, the training set, we take the age variable, and we say we want a third degree polynomial for this variable. So when you do that, you essentially get, you'll get a three-column matrix out. So this is now three new variables. This variable corresponds to age, the actual age values. There are scales for computational purposes.
# The second column will correspond to something like age squared. So, in other words, you're allowing it to fit a quadratic relationship between age and the outcome. And the third column will correspond to age cubed, so you allow a cubic relationship between age and the outcome. So this'll, if you include these covariates in the model instead of just the age variable when you're fitting a linear regression, you allow for curvy model fitting.
# fitting curves with splines
lm1 <- lm(wage ~bsBasis, data=training)
plot(training$age, training$wage, pch=19, cex=0.5)
# points(training$age, predict(lm1, newdata=training), col="red", pch=19, cex=0.5)
# splines on the test set
predict(bsBasis, age=testing$age)
## 1 2 3
## [1,] 0.000000000 0.0000000000 0.000000e+00
## [2,] 0.236850055 0.0253767916 9.063140e-04
## [3,] 0.416337988 0.3211750193 8.258786e-02
## [4,] 0.430813836 0.2910904300 6.556091e-02
## [5,] 0.306334128 0.4241549461 1.957638e-01
## [6,] 0.424154946 0.3063341278 7.374710e-02
## [7,] 0.377630828 0.0906313987 7.250512e-03
## [8,] 0.440355309 0.2596967205 5.105149e-02
## [9,] 0.335537578 0.4074384881 1.649156e-01
## [10,] 0.416337988 0.3211750193 8.258786e-02
## [11,] 0.433331375 0.1637029640 2.061445e-02
## [12,] 0.444358195 0.2275981001 3.885821e-02
## [13,] 0.306334128 0.4241549461 1.957638e-01
## [14,] 0.442218287 0.1953987782 2.877966e-02
## [15,] 0.275519452 0.4362391326 2.302373e-01
## [16,] 0.444093854 0.2114732637 3.356718e-02
## [17,] 0.443086838 0.2436977611 4.467792e-02
## [18,] 0.443086838 0.2436977611 4.467792e-02
## [19,] 0.444093854 0.2114732637 3.356718e-02
## [20,] 0.375000000 0.3750000000 1.250000e-01
## [21,] 0.430813836 0.2910904300 6.556091e-02
## [22,] 0.426168977 0.1482326877 1.718640e-02
## [23,] 0.259696720 0.4403553087 2.488965e-01
## [24,] 0.000000000 0.0000000000 0.000000e+00
## [25,] 0.291090430 0.4308138364 2.125348e-01
## [26,] 0.417093250 0.1331148669 1.416116e-02
## [27,] 0.438655970 0.1794501695 2.447048e-02
## [28,] 0.275519452 0.4362391326 2.302373e-01
## [29,] 0.065456010 0.3403712531 5.899768e-01
## [30,] 0.266544426 0.0339238361 1.439193e-03
## [31,] 0.406028666 0.1184250277 1.151354e-02
## [32,] 0.430813836 0.2910904300 6.556091e-02
## [33,] 0.444358195 0.2275981001 3.885821e-02
## [34,] 0.335537578 0.4074384881 1.649156e-01
## [35,] 0.266544426 0.0339238361 1.439193e-03
## [36,] 0.417093250 0.1331148669 1.416116e-02
## [37,] 0.259696720 0.4403553087 2.488965e-01
## [38,] 0.054038972 0.3182294988 6.246727e-01
## [39,] 0.204487093 0.0179374643 5.244873e-04
## [40,] 0.377630828 0.0906313987 7.250512e-03
## [41,] 0.169380014 0.0116813803 2.685375e-04
## [42,] 0.227598100 0.4443581954 2.891855e-01
## [43,] 0.340371253 0.0654560102 4.195898e-03
## [44,] 0.195398778 0.4422182874 3.336033e-01
## [45,] 0.426168977 0.1482326877 1.718640e-02
## [46,] 0.430813836 0.2910904300 6.556091e-02
## [47,] 0.306334128 0.4241549461 1.957638e-01
## [48,] 0.386693968 0.3625255950 1.132892e-01
## [49,] 0.375000000 0.3750000000 1.250000e-01
## [50,] 0.436239133 0.2755194522 5.800410e-02
## [51,] 0.291090430 0.4308138364 2.125348e-01
## [52,] 0.131453291 0.0066840657 1.132892e-04
## [53,] 0.243697761 0.4430868383 2.685375e-01
## [54,] 0.392899701 0.1042386963 9.218388e-03
## [55,] 0.266544426 0.0339238361 1.439193e-03
## [56,] 0.406028666 0.1184250277 1.151354e-02
## [57,] 0.424154946 0.3063341278 7.374710e-02
## [58,] 0.211473264 0.4440938538 3.108657e-01
## [59,] 0.424154946 0.3063341278 7.374710e-02
## [60,] 0.291090430 0.4308138364 2.125348e-01
## [61,] 0.266544426 0.0339238361 1.439193e-03
## [62,] 0.321175019 0.4163379880 1.798991e-01
## [63,] 0.065456010 0.3403712531 5.899768e-01
## [64,] 0.397531973 0.3493462791 1.023338e-01
## [65,] 0.426168977 0.1482326877 1.718640e-02
## [66,] 0.169380014 0.0116813803 2.685375e-04
## [67,] 0.416337988 0.3211750193 8.258786e-02
## [68,] 0.430813836 0.2910904300 6.556091e-02
## [69,] 0.417093250 0.1331148669 1.416116e-02
## [70,] 0.179450170 0.4386559699 3.574234e-01
## [71,] 0.442218287 0.1953987782 2.877966e-02
## [72,] 0.362525595 0.3866939680 1.374912e-01
## [73,] 0.440355309 0.2596967205 5.105149e-02
## [74,] 0.444093854 0.2114732637 3.356718e-02
## [75,] 0.433331375 0.1637029640 2.061445e-02
## [76,] 0.360146521 0.0776786613 5.584740e-03
## [77,] 0.444358195 0.2275981001 3.885821e-02
## [78,] 0.291090430 0.4308138364 2.125348e-01
## [79,] 0.444093854 0.2114732637 3.356718e-02
## [80,] 0.375000000 0.3750000000 1.250000e-01
## [81,] 0.436239133 0.2755194522 5.800410e-02
## [82,] 0.430813836 0.2910904300 6.556091e-02
## [83,] 0.444093854 0.2114732637 3.356718e-02
## [84,] 0.259696720 0.4403553087 2.488965e-01
## [85,] 0.266544426 0.0339238361 1.439193e-03
## [86,] 0.375000000 0.3750000000 1.250000e-01
## [87,] 0.440355309 0.2596967205 5.105149e-02
## [88,] 0.375000000 0.3750000000 1.250000e-01
## [89,] 0.335537578 0.4074384881 1.649156e-01
## [90,] 0.430813836 0.2910904300 6.556091e-02
## [91,] 0.211473264 0.4440938538 3.108657e-01
## [92,] 0.407438488 0.3355375785 9.210835e-02
## [93,] 0.131453291 0.0066840657 1.132892e-04
## [94,] 0.195398778 0.4422182874 3.336033e-01
## [95,] 0.406028666 0.1184250277 1.151354e-02
## [96,] 0.293645732 0.0435030714 2.148300e-03
## [97,] 0.406028666 0.1184250277 1.151354e-02
## [98,] 0.442218287 0.1953987782 2.877966e-02
## [99,] 0.169380014 0.0116813803 2.685375e-04
## [100,] 0.424154946 0.3063341278 7.374710e-02
## [101,] 0.433331375 0.1637029640 2.061445e-02
## [102,] 0.443086838 0.2436977611 4.467792e-02
## [103,] 0.433331375 0.1637029640 2.061445e-02
## [104,] 0.433331375 0.1637029640 2.061445e-02
## [105,] 0.430813836 0.2910904300 6.556091e-02
## [106,] 0.417093250 0.1331148669 1.416116e-02
## [107,] 0.211473264 0.4440938538 3.108657e-01
## [108,] 0.444093854 0.2114732637 3.356718e-02
## [109,] 0.321175019 0.4163379880 1.798991e-01
## [110,] 0.259696720 0.4403553087 2.488965e-01
## [111,] 0.148232688 0.4261689772 4.084119e-01
## [112,] 0.433331375 0.1637029640 2.061445e-02
## [113,] 0.306334128 0.4241549461 1.957638e-01
## [114,] 0.416337988 0.3211750193 8.258786e-02
## [115,] 0.386693968 0.3625255950 1.132892e-01
## [116,] 0.407438488 0.3355375785 9.210835e-02
## [117,] 0.291090430 0.4308138364 2.125348e-01
## [118,] 0.375000000 0.3750000000 1.250000e-01
## [119,] 0.426168977 0.1482326877 1.718640e-02
## [120,] 0.443086838 0.2436977611 4.467792e-02
## [121,] 0.442218287 0.1953987782 2.877966e-02
## [122,] 0.444358195 0.2275981001 3.885821e-02
## [123,] 0.335537578 0.4074384881 1.649156e-01
## [124,] 0.362525595 0.3866939680 1.374912e-01
## [125,] 0.397531973 0.3493462791 1.023338e-01
## [126,] 0.318229499 0.0540389715 3.058810e-03
## [127,] 0.424154946 0.3063341278 7.374710e-02
## [128,] 0.442218287 0.1953987782 2.877966e-02
## [129,] 0.335537578 0.4074384881 1.649156e-01
## [130,] 0.444358195 0.2275981001 3.885821e-02
## [131,] 0.392899701 0.1042386963 9.218388e-03
## [132,] 0.243697761 0.4430868383 2.685375e-01
## [133,] 0.377630828 0.0906313987 7.250512e-03
## [134,] 0.318229499 0.0540389715 3.058810e-03
## [135,] 0.433331375 0.1637029640 2.061445e-02
## [136,] 0.386693968 0.3625255950 1.132892e-01
## [137,] 0.360146521 0.0776786613 5.584740e-03
## [138,] 0.266544426 0.0339238361 1.439193e-03
## [139,] 0.443086838 0.2436977611 4.467792e-02
## [140,] 0.318229499 0.0540389715 3.058810e-03
## [141,] 0.375000000 0.3750000000 1.250000e-01
## [142,] 0.169380014 0.0116813803 2.685375e-04
## [143,] 0.416337988 0.3211750193 8.258786e-02
## [144,] 0.163702964 0.4333313752 3.823512e-01
## [145,] 0.375000000 0.3750000000 1.250000e-01
## [146,] 0.266544426 0.0339238361 1.439193e-03
## [147,] 0.360146521 0.0776786613 5.584740e-03
## [148,] 0.442218287 0.1953987782 2.877966e-02
## [149,] 0.433331375 0.1637029640 2.061445e-02
## [150,] 0.407438488 0.3355375785 9.210835e-02
## [151,] 0.243697761 0.4430868383 2.685375e-01
## [152,] 0.444358195 0.2275981001 3.885821e-02
## [153,] 0.442218287 0.1953987782 2.877966e-02
## [154,] 0.318229499 0.0540389715 3.058810e-03
## [155,] 0.442218287 0.1953987782 2.877966e-02
## [156,] 0.275519452 0.4362391326 2.302373e-01
## [157,] 0.438655970 0.1794501695 2.447048e-02
## [158,] 0.204487093 0.0179374643 5.244873e-04
## [159,] 0.407438488 0.3355375785 9.210835e-02
## [160,] 0.306334128 0.4241549461 1.957638e-01
## [161,] 0.179450170 0.4386559699 3.574234e-01
## [162,] 0.443086838 0.2436977611 4.467792e-02
## [163,] 0.321175019 0.4163379880 1.798991e-01
## [164,] 0.204487093 0.0179374643 5.244873e-04
## [165,] 0.426168977 0.1482326877 1.718640e-02
## [166,] 0.430813836 0.2910904300 6.556091e-02
## [167,] 0.227598100 0.4443581954 2.891855e-01
## [168,] 0.211473264 0.4440938538 3.108657e-01
## [169,] 0.375000000 0.3750000000 1.250000e-01
## [170,] 0.416337988 0.3211750193 8.258786e-02
## [171,] 0.169380014 0.0116813803 2.685375e-04
## [172,] 0.438655970 0.1794501695 2.447048e-02
## [173,] 0.444093854 0.2114732637 3.356718e-02
## [174,] 0.397531973 0.3493462791 1.023338e-01
## [175,] 0.433331375 0.1637029640 2.061445e-02
## [176,] 0.375000000 0.3750000000 1.250000e-01
## [177,] 0.443086838 0.2436977611 4.467792e-02
## [178,] 0.406028666 0.1184250277 1.151354e-02
## [179,] 0.259696720 0.4403553087 2.488965e-01
## [180,] 0.033923836 0.2665444262 6.980925e-01
## [181,] 0.375000000 0.3750000000 1.250000e-01
## [182,] 0.377630828 0.0906313987 7.250512e-03
## [183,] 0.360146521 0.0776786613 5.584740e-03
## [184,] 0.444358195 0.2275981001 3.885821e-02
## [185,] 0.436239133 0.2755194522 5.800410e-02
## [186,] 0.386693968 0.3625255950 1.132892e-01
## [187,] 0.424154946 0.3063341278 7.374710e-02
## [188,] 0.406028666 0.1184250277 1.151354e-02
## [189,] 0.407438488 0.3355375785 9.210835e-02
## [190,] 0.335537578 0.4074384881 1.649156e-01
## [191,] 0.169380014 0.0116813803 2.685375e-04
## [192,] 0.321175019 0.4163379880 1.798991e-01
## [193,] 0.426168977 0.1482326877 1.718640e-02
## [194,] 0.444093854 0.2114732637 3.356718e-02
## [195,] 0.436239133 0.2755194522 5.800410e-02
## [196,] 0.266544426 0.0339238361 1.439193e-03
## [197,] 0.360146521 0.0776786613 5.584740e-03
## [198,] 0.340371253 0.0654560102 4.195898e-03
## [199,] 0.407438488 0.3355375785 9.210835e-02
## [200,] 0.275519452 0.4362391326 2.302373e-01
## [201,] 0.440355309 0.2596967205 5.105149e-02
## [202,] 0.195398778 0.4422182874 3.336033e-01
## [203,] 0.397531973 0.3493462791 1.023338e-01
## [204,] 0.318229499 0.0540389715 3.058810e-03
## [205,] 0.243697761 0.4430868383 2.685375e-01
## [206,] 0.318229499 0.0540389715 3.058810e-03
## [207,] 0.335537578 0.4074384881 1.649156e-01
## [208,] 0.416337988 0.3211750193 8.258786e-02
## [209,] 0.266544426 0.0339238361 1.439193e-03
## [210,] 0.440355309 0.2596967205 5.105149e-02
## [211,] 0.306334128 0.4241549461 1.957638e-01
## [212,] 0.204487093 0.0179374643 5.244873e-04
## [213,] 0.392899701 0.1042386963 9.218388e-03
## [214,] 0.335537578 0.4074384881 1.649156e-01
## [215,] 0.416337988 0.3211750193 8.258786e-02
## [216,] 0.443086838 0.2436977611 4.467792e-02
## [217,] 0.417093250 0.1331148669 1.416116e-02
## [218,] 0.266544426 0.0339238361 1.439193e-03
## [219,] 0.236850055 0.0253767916 9.063140e-04
## [220,] 0.236850055 0.0253767916 9.063140e-04
## [221,] 0.440355309 0.2596967205 5.105149e-02
## [222,] 0.436239133 0.2755194522 5.800410e-02
## [223,] 0.291090430 0.4308138364 2.125348e-01
## [224,] 0.211473264 0.4440938538 3.108657e-01
## [225,] 0.443086838 0.2436977611 4.467792e-02
## [226,] 0.440355309 0.2596967205 5.105149e-02
## [227,] 0.000000000 0.0000000000 1.000000e+00
## [228,] 0.321175019 0.4163379880 1.798991e-01
## [229,] 0.443086838 0.2436977611 4.467792e-02
## [230,] 0.433331375 0.1637029640 2.061445e-02
## [231,] 0.236850055 0.0253767916 9.063140e-04
## [232,] 0.377630828 0.0906313987 7.250512e-03
## [233,] 0.090631399 0.3776308281 5.244873e-01
## [234,] 0.306334128 0.4241549461 1.957638e-01
## [235,] 0.318229499 0.0540389715 3.058810e-03
## [236,] 0.321175019 0.4163379880 1.798991e-01
## [237,] 0.386693968 0.3625255950 1.132892e-01
## [238,] 0.227598100 0.4443581954 2.891855e-01
## [239,] 0.416337988 0.3211750193 8.258786e-02
## [240,] 0.430813836 0.2910904300 6.556091e-02
## [241,] 0.377630828 0.0906313987 7.250512e-03
## [242,] 0.259696720 0.4403553087 2.488965e-01
## [243,] 0.321175019 0.4163379880 1.798991e-01
## [244,] 0.436239133 0.2755194522 5.800410e-02
## [245,] 0.204487093 0.0179374643 5.244873e-04
## [246,] 0.243697761 0.4430868383 2.685375e-01
## [247,] 0.430813836 0.2910904300 6.556091e-02
## [248,] 0.417093250 0.1331148669 1.416116e-02
## [249,] 0.275519452 0.4362391326 2.302373e-01
## [250,] 0.442218287 0.1953987782 2.877966e-02
## [251,] 0.440355309 0.2596967205 5.105149e-02
## [252,] 0.417093250 0.1331148669 1.416116e-02
## [253,] 0.362525595 0.3866939680 1.374912e-01
## [254,] 0.321175019 0.4163379880 1.798991e-01
## [255,] 0.442218287 0.1953987782 2.877966e-02
## [256,] 0.090631399 0.0030210466 3.356718e-05
## [257,] 0.293645732 0.0435030714 2.148300e-03
## [258,] 0.360146521 0.0776786613 5.584740e-03
## [259,] 0.397531973 0.3493462791 1.023338e-01
## [260,] 0.306334128 0.4241549461 1.957638e-01
## [261,] 0.204487093 0.0179374643 5.244873e-04
## [262,] 0.430813836 0.2910904300 6.556091e-02
## [263,] 0.386693968 0.3625255950 1.132892e-01
## [264,] 0.417093250 0.1331148669 1.416116e-02
## [265,] 0.335537578 0.4074384881 1.649156e-01
## [266,] 0.349346279 0.3975319727 1.507880e-01
## [267,] 0.397531973 0.3493462791 1.023338e-01
## [268,] 0.340371253 0.0654560102 4.195898e-03
## [269,] 0.335537578 0.4074384881 1.649156e-01
## [270,] 0.204487093 0.0179374643 5.244873e-04
## [271,] 0.133114867 0.4170932496 4.356307e-01
## [272,] 0.318229499 0.0540389715 3.058810e-03
## [273,] 0.417093250 0.1331148669 1.416116e-02
## [274,] 0.375000000 0.3750000000 1.250000e-01
## [275,] 0.318229499 0.0540389715 3.058810e-03
## [276,] 0.443086838 0.2436977611 4.467792e-02
## [277,] 0.407438488 0.3355375785 9.210835e-02
## [278,] 0.321175019 0.4163379880 1.798991e-01
## [279,] 0.266544426 0.0339238361 1.439193e-03
## [280,] 0.433331375 0.1637029640 2.061445e-02
## [281,] 0.362525595 0.3866939680 1.374912e-01
## [282,] 0.426168977 0.1482326877 1.718640e-02
## [283,] 0.386693968 0.3625255950 1.132892e-01
## [284,] 0.375000000 0.3750000000 1.250000e-01
## [285,] 0.440355309 0.2596967205 5.105149e-02
## [286,] 0.442218287 0.1953987782 2.877966e-02
## [287,] 0.243697761 0.4430868383 2.685375e-01
## [288,] 0.340371253 0.0654560102 4.195898e-03
## [289,] 0.417093250 0.1331148669 1.416116e-02
## [290,] 0.362525595 0.3866939680 1.374912e-01
## [291,] 0.444093854 0.2114732637 3.356718e-02
## [292,] 0.375000000 0.3750000000 1.250000e-01
## [293,] 0.424154946 0.3063341278 7.374710e-02
## [294,] 0.362525595 0.3866939680 1.374912e-01
## [295,] 0.416337988 0.3211750193 8.258786e-02
## [296,] 0.424154946 0.3063341278 7.374710e-02
## [297,] 0.227598100 0.4443581954 2.891855e-01
## [298,] 0.349346279 0.3975319727 1.507880e-01
## [299,] 0.416337988 0.3211750193 8.258786e-02
## [300,] 0.417093250 0.1331148669 1.416116e-02
## [301,] 0.416337988 0.3211750193 8.258786e-02
## [302,] 0.362525595 0.3866939680 1.374912e-01
## [303,] 0.444358195 0.2275981001 3.885821e-02
## [304,] 0.375000000 0.3750000000 1.250000e-01
## [305,] 0.090631399 0.0030210466 3.356718e-05
## [306,] 0.392899701 0.1042386963 9.218388e-03
## [307,] 0.375000000 0.3750000000 1.250000e-01
## [308,] 0.275519452 0.4362391326 2.302373e-01
## [309,] 0.195398778 0.4422182874 3.336033e-01
## [310,] 0.275519452 0.4362391326 2.302373e-01
## [311,] 0.349346279 0.3975319727 1.507880e-01
## [312,] 0.436239133 0.2755194522 5.800410e-02
## [313,] 0.416337988 0.3211750193 8.258786e-02
## [314,] 0.377630828 0.0906313987 7.250512e-03
## [315,] 0.386693968 0.3625255950 1.132892e-01
## [316,] 0.417093250 0.1331148669 1.416116e-02
## [317,] 0.392899701 0.1042386963 9.218388e-03
## [318,] 0.386693968 0.3625255950 1.132892e-01
## [319,] 0.433331375 0.1637029640 2.061445e-02
## [320,] 0.397531973 0.3493462791 1.023338e-01
## [321,] 0.416337988 0.3211750193 8.258786e-02
## [322,] 0.335537578 0.4074384881 1.649156e-01
## [323,] 0.375000000 0.3750000000 1.250000e-01
## [324,] 0.407438488 0.3355375785 9.210835e-02
## [325,] 0.430813836 0.2910904300 6.556091e-02
## [326,] 0.424154946 0.3063341278 7.374710e-02
## [327,] 0.443086838 0.2436977611 4.467792e-02
## [328,] 0.417093250 0.1331148669 1.416116e-02
## [329,] 0.444093854 0.2114732637 3.356718e-02
## [330,] 0.440355309 0.2596967205 5.105149e-02
## [331,] 0.377630828 0.0906313987 7.250512e-03
## [332,] 0.349346279 0.3975319727 1.507880e-01
## [333,] 0.444358195 0.2275981001 3.885821e-02
## [334,] 0.433331375 0.1637029640 2.061445e-02
## [335,] 0.397531973 0.3493462791 1.023338e-01
## [336,] 0.349346279 0.3975319727 1.507880e-01
## [337,] 0.440355309 0.2596967205 5.105149e-02
## [338,] 0.163702964 0.4333313752 3.823512e-01
## [339,] 0.195398778 0.4422182874 3.336033e-01
## [340,] 0.407438488 0.3355375785 9.210835e-02
## [341,] 0.204487093 0.0179374643 5.244873e-04
## [342,] 0.416337988 0.3211750193 8.258786e-02
## [343,] 0.163702964 0.4333313752 3.823512e-01
## [344,] 0.227598100 0.4443581954 2.891855e-01
## [345,] 0.377630828 0.0906313987 7.250512e-03
## [346,] 0.416337988 0.3211750193 8.258786e-02
## [347,] 0.436239133 0.2755194522 5.800410e-02
## [348,] 0.335537578 0.4074384881 1.649156e-01
## [349,] 0.306334128 0.4241549461 1.957638e-01
## [350,] 0.377630828 0.0906313987 7.250512e-03
## [351,] 0.444093854 0.2114732637 3.356718e-02
## [352,] 0.444358195 0.2275981001 3.885821e-02
## [353,] 0.362525595 0.3866939680 1.374912e-01
## [354,] 0.397531973 0.3493462791 1.023338e-01
## [355,] 0.416337988 0.3211750193 8.258786e-02
## [356,] 0.424154946 0.3063341278 7.374710e-02
## [357,] 0.335537578 0.4074384881 1.649156e-01
## [358,] 0.436239133 0.2755194522 5.800410e-02
## [359,] 0.275519452 0.4362391326 2.302373e-01
## [360,] 0.362525595 0.3866939680 1.374912e-01
## [361,] 0.321175019 0.4163379880 1.798991e-01
## [362,] 0.318229499 0.0540389715 3.058810e-03
## [363,] 0.275519452 0.4362391326 2.302373e-01
## [364,] 0.362525595 0.3866939680 1.374912e-01
## [365,] 0.362525595 0.3866939680 1.374912e-01
## [366,] 0.375000000 0.3750000000 1.250000e-01
## [367,] 0.436239133 0.2755194522 5.800410e-02
## [368,] 0.362525595 0.3866939680 1.374912e-01
## [369,] 0.321175019 0.4163379880 1.798991e-01
## [370,] 0.340371253 0.0654560102 4.195898e-03
## [371,] 0.236850055 0.0253767916 9.063140e-04
## [372,] 0.266544426 0.0339238361 1.439193e-03
## [373,] 0.444093854 0.2114732637 3.356718e-02
## [374,] 0.397531973 0.3493462791 1.023338e-01
## [375,] 0.444093854 0.2114732637 3.356718e-02
## [376,] 0.444358195 0.2275981001 3.885821e-02
## [377,] 0.335537578 0.4074384881 1.649156e-01
## [378,] 0.195398778 0.4422182874 3.336033e-01
## [379,] 0.195398778 0.4422182874 3.336033e-01
## [380,] 0.318229499 0.0540389715 3.058810e-03
## [381,] 0.416337988 0.3211750193 8.258786e-02
## [382,] 0.243697761 0.4430868383 2.685375e-01
## [383,] 0.426168977 0.1482326877 1.718640e-02
## [384,] 0.443086838 0.2436977611 4.467792e-02
## [385,] 0.349346279 0.3975319727 1.507880e-01
## [386,] 0.362525595 0.3866939680 1.374912e-01
## [387,] 0.148232688 0.4261689772 4.084119e-01
## [388,] 0.306334128 0.4241549461 1.957638e-01
## [389,] 0.436239133 0.2755194522 5.800410e-02
## [390,] 0.392899701 0.1042386963 9.218388e-03
## [391,] 0.406028666 0.1184250277 1.151354e-02
## [392,] 0.349346279 0.3975319727 1.507880e-01
## [393,] 0.017937464 0.2044870934 7.770510e-01
## [394,] 0.340371253 0.0654560102 4.195898e-03
## [395,] 0.340371253 0.0654560102 4.195898e-03
## [396,] 0.406028666 0.1184250277 1.151354e-02
## [397,] 0.321175019 0.4163379880 1.798991e-01
## [398,] 0.438655970 0.1794501695 2.447048e-02
## [399,] 0.430813836 0.2910904300 6.556091e-02
## [400,] 0.349346279 0.3975319727 1.507880e-01
## [401,] 0.444358195 0.2275981001 3.885821e-02
## [402,] 0.227598100 0.4443581954 2.891855e-01
## [403,] 0.204487093 0.0179374643 5.244873e-04
## [404,] 0.443086838 0.2436977611 4.467792e-02
## [405,] 0.266544426 0.0339238361 1.439193e-03
## [406,] 0.397531973 0.3493462791 1.023338e-01
## [407,] 0.335537578 0.4074384881 1.649156e-01
## [408,] 0.417093250 0.1331148669 1.416116e-02
## [409,] 0.442218287 0.1953987782 2.877966e-02
## [410,] 0.426168977 0.1482326877 1.718640e-02
## [411,] 0.349346279 0.3975319727 1.507880e-01
## [412,] 0.362525595 0.3866939680 1.374912e-01
## [413,] 0.148232688 0.4261689772 4.084119e-01
## [414,] 0.306334128 0.4241549461 1.957638e-01
## [415,] 0.362525595 0.3866939680 1.374912e-01
## [416,] 0.406028666 0.1184250277 1.151354e-02
## [417,] 0.442218287 0.1953987782 2.877966e-02
## [418,] 0.046838810 0.0007678494 4.195898e-06
## [419,] 0.436239133 0.2755194522 5.800410e-02
## [420,] 0.293645732 0.0435030714 2.148300e-03
## [421,] 0.407438488 0.3355375785 9.210835e-02
## [422,] 0.000000000 0.0000000000 0.000000e+00
## [423,] 0.430813836 0.2910904300 6.556091e-02
## [424,] 0.179450170 0.4386559699 3.574234e-01
## [425,] 0.443086838 0.2436977611 4.467792e-02
## [426,] 0.406028666 0.1184250277 1.151354e-02
## [427,] 0.386693968 0.3625255950 1.132892e-01
## [428,] 0.433331375 0.1637029640 2.061445e-02
## [429,] 0.397531973 0.3493462791 1.023338e-01
## [430,] 0.291090430 0.4308138364 2.125348e-01
## [431,] 0.335537578 0.4074384881 1.649156e-01
## [432,] 0.318229499 0.0540389715 3.058810e-03
## [433,] 0.169380014 0.0116813803 2.685375e-04
## [434,] 0.436239133 0.2755194522 5.800410e-02
## [435,] 0.360146521 0.0776786613 5.584740e-03
## [436,] 0.392899701 0.1042386963 9.218388e-03
## [437,] 0.227598100 0.4443581954 2.891855e-01
## [438,] 0.438655970 0.1794501695 2.447048e-02
## [439,] 0.406028666 0.1184250277 1.151354e-02
## [440,] 0.406028666 0.1184250277 1.151354e-02
## [441,] 0.266544426 0.0339238361 1.439193e-03
## [442,] 0.430813836 0.2910904300 6.556091e-02
## [443,] 0.259696720 0.4403553087 2.488965e-01
## [444,] 0.375000000 0.3750000000 1.250000e-01
## [445,] 0.440355309 0.2596967205 5.105149e-02
## [446,] 0.211473264 0.4440938538 3.108657e-01
## [447,] 0.275519452 0.4362391326 2.302373e-01
## [448,] 0.318229499 0.0540389715 3.058810e-03
## [449,] 0.397531973 0.3493462791 1.023338e-01
## [450,] 0.440355309 0.2596967205 5.105149e-02
## [451,] 0.360146521 0.0776786613 5.584740e-03
## [452,] 0.436239133 0.2755194522 5.800410e-02
## [453,] 0.349346279 0.3975319727 1.507880e-01
## [454,] 0.397531973 0.3493462791 1.023338e-01
## [455,] 0.392899701 0.1042386963 9.218388e-03
## [456,] 0.227598100 0.4443581954 2.891855e-01
## [457,] 0.436239133 0.2755194522 5.800410e-02
## [458,] 0.433331375 0.1637029640 2.061445e-02
## [459,] 0.444093854 0.2114732637 3.356718e-02
## [460,] 0.416337988 0.3211750193 8.258786e-02
## [461,] 0.243697761 0.4430868383 2.685375e-01
## [462,] 0.293645732 0.0435030714 2.148300e-03
## [463,] 0.377630828 0.0906313987 7.250512e-03
## [464,] 0.444093854 0.2114732637 3.356718e-02
## [465,] 0.335537578 0.4074384881 1.649156e-01
## [466,] 0.321175019 0.4163379880 1.798991e-01
## [467,] 0.335537578 0.4074384881 1.649156e-01
## [468,] 0.318229499 0.0540389715 3.058810e-03
## [469,] 0.406028666 0.1184250277 1.151354e-02
## [470,] 0.430813836 0.2910904300 6.556091e-02
## [471,] 0.362525595 0.3866939680 1.374912e-01
## [472,] 0.321175019 0.4163379880 1.798991e-01
## [473,] 0.306334128 0.4241549461 1.957638e-01
## [474,] 0.236850055 0.0253767916 9.063140e-04
## [475,] 0.443086838 0.2436977611 4.467792e-02
## [476,] 0.377630828 0.0906313987 7.250512e-03
## [477,] 0.291090430 0.4308138364 2.125348e-01
## [478,] 0.416337988 0.3211750193 8.258786e-02
## [479,] 0.424154946 0.3063341278 7.374710e-02
## [480,] 0.442218287 0.1953987782 2.877966e-02
## [481,] 0.424154946 0.3063341278 7.374710e-02
## [482,] 0.335537578 0.4074384881 1.649156e-01
## [483,] 0.291090430 0.4308138364 2.125348e-01
## [484,] 0.430813836 0.2910904300 6.556091e-02
## [485,] 0.318229499 0.0540389715 3.058810e-03
## [486,] 0.430813836 0.2910904300 6.556091e-02
## [487,] 0.377630828 0.0906313987 7.250512e-03
## [488,] 0.430813836 0.2910904300 6.556091e-02
## [489,] 0.386693968 0.3625255950 1.132892e-01
## [490,] 0.417093250 0.1331148669 1.416116e-02
## [491,] 0.362525595 0.3866939680 1.374912e-01
## [492,] 0.375000000 0.3750000000 1.250000e-01
## [493,] 0.236850055 0.0253767916 9.063140e-04
## [494,] 0.424154946 0.3063341278 7.374710e-02
## [495,] 0.417093250 0.1331148669 1.416116e-02
## [496,] 0.386693968 0.3625255950 1.132892e-01
## [497,] 0.275519452 0.4362391326 2.302373e-01
## [498,] 0.424154946 0.3063341278 7.374710e-02
## [499,] 0.318229499 0.0540389715 3.058810e-03
## [500,] 0.243697761 0.4430868383 2.685375e-01
## [501,] 0.335537578 0.4074384881 1.649156e-01
## [502,] 0.349346279 0.3975319727 1.507880e-01
## [503,] 0.392899701 0.1042386963 9.218388e-03
## [504,] 0.416337988 0.3211750193 8.258786e-02
## [505,] 0.430813836 0.2910904300 6.556091e-02
## [506,] 0.407438488 0.3355375785 9.210835e-02
## [507,] 0.349346279 0.3975319727 1.507880e-01
## [508,] 0.335537578 0.4074384881 1.649156e-01
## [509,] 0.443086838 0.2436977611 4.467792e-02
## [510,] 0.293645732 0.0435030714 2.148300e-03
## [511,] 0.375000000 0.3750000000 1.250000e-01
## [512,] 0.444093854 0.2114732637 3.356718e-02
## [513,] 0.362525595 0.3866939680 1.374912e-01
## [514,] 0.163702964 0.4333313752 3.823512e-01
## [515,] 0.433331375 0.1637029640 2.061445e-02
## [516,] 0.417093250 0.1331148669 1.416116e-02
## [517,] 0.360146521 0.0776786613 5.584740e-03
## [518,] 0.179450170 0.4386559699 3.574234e-01
## [519,] 0.243697761 0.4430868383 2.685375e-01
## [520,] 0.444358195 0.2275981001 3.885821e-02
## [521,] 0.236850055 0.0253767916 9.063140e-04
## [522,] 0.195398778 0.4422182874 3.336033e-01
## [523,] 0.243697761 0.4430868383 2.685375e-01
## [524,] 0.397531973 0.3493462791 1.023338e-01
## [525,] 0.444093854 0.2114732637 3.356718e-02
## [526,] 0.392899701 0.1042386963 9.218388e-03
## [527,] 0.275519452 0.4362391326 2.302373e-01
## [528,] 0.424154946 0.3063341278 7.374710e-02
## [529,] 0.392899701 0.1042386963 9.218388e-03
## [530,] 0.291090430 0.4308138364 2.125348e-01
## [531,] 0.362525595 0.3866939680 1.374912e-01
## [532,] 0.266544426 0.0339238361 1.439193e-03
## [533,] 0.291090430 0.4308138364 2.125348e-01
## [534,] 0.340371253 0.0654560102 4.195898e-03
## [535,] 0.377630828 0.0906313987 7.250512e-03
## [536,] 0.407438488 0.3355375785 9.210835e-02
## [537,] 0.204487093 0.0179374643 5.244873e-04
## [538,] 0.211473264 0.4440938538 3.108657e-01
## [539,] 0.416337988 0.3211750193 8.258786e-02
## [540,] 0.417093250 0.1331148669 1.416116e-02
## [541,] 0.243697761 0.4430868383 2.685375e-01
## [542,] 0.236850055 0.0253767916 9.063140e-04
## [543,] 0.275519452 0.4362391326 2.302373e-01
## [544,] 0.275519452 0.4362391326 2.302373e-01
## [545,] 0.275519452 0.4362391326 2.302373e-01
## [546,] 0.416337988 0.3211750193 8.258786e-02
## [547,] 0.243697761 0.4430868383 2.685375e-01
## [548,] 0.377630828 0.0906313987 7.250512e-03
## [549,] 0.407438488 0.3355375785 9.210835e-02
## [550,] 0.386693968 0.3625255950 1.132892e-01
## [551,] 0.392899701 0.1042386963 9.218388e-03
## [552,] 0.306334128 0.4241549461 1.957638e-01
## [553,] 0.335537578 0.4074384881 1.649156e-01
## [554,] 0.065456010 0.3403712531 5.899768e-01
## [555,] 0.424154946 0.3063341278 7.374710e-02
## [556,] 0.426168977 0.1482326877 1.718640e-02
## [557,] 0.340371253 0.0654560102 4.195898e-03
## [558,] 0.444358195 0.2275981001 3.885821e-02
## [559,] 0.335537578 0.4074384881 1.649156e-01
## [560,] 0.426168977 0.1482326877 1.718640e-02
## [561,] 0.417093250 0.1331148669 1.416116e-02
## [562,] 0.416337988 0.3211750193 8.258786e-02
## [563,] 0.243697761 0.4430868383 2.685375e-01
## [564,] 0.163702964 0.4333313752 3.823512e-01
## [565,] 0.321175019 0.4163379880 1.798991e-01
## [566,] 0.131453291 0.0066840657 1.132892e-04
## [567,] 0.444093854 0.2114732637 3.356718e-02
## [568,] 0.000000000 0.0000000000 0.000000e+00
## [569,] 0.340371253 0.0654560102 4.195898e-03
## [570,] 0.417093250 0.1331148669 1.416116e-02
## [571,] 0.406028666 0.1184250277 1.151354e-02
## [572,] 0.340371253 0.0654560102 4.195898e-03
## [573,] 0.397531973 0.3493462791 1.023338e-01
## [574,] 0.321175019 0.4163379880 1.798991e-01
## [575,] 0.386693968 0.3625255950 1.132892e-01
## [576,] 0.438655970 0.1794501695 2.447048e-02
## [577,] 0.090631399 0.3776308281 5.244873e-01
## [578,] 0.133114867 0.4170932496 4.356307e-01
## [579,] 0.443086838 0.2436977611 4.467792e-02
## [580,] 0.438655970 0.1794501695 2.447048e-02
## [581,] 0.442218287 0.1953987782 2.877966e-02
## [582,] 0.236850055 0.0253767916 9.063140e-04
## [583,] 0.118425028 0.4060286664 4.640328e-01
## [584,] 0.417093250 0.1331148669 1.416116e-02
## [585,] 0.424154946 0.3063341278 7.374710e-02
## [586,] 0.386693968 0.3625255950 1.132892e-01
## [587,] 0.397531973 0.3493462791 1.023338e-01
## [588,] 0.440355309 0.2596967205 5.105149e-02
## [589,] 0.291090430 0.4308138364 2.125348e-01
## [590,] 0.417093250 0.1331148669 1.416116e-02
## [591,] 0.275519452 0.4362391326 2.302373e-01
## [592,] 0.360146521 0.0776786613 5.584740e-03
## [593,] 0.397531973 0.3493462791 1.023338e-01
## [594,] 0.416337988 0.3211750193 8.258786e-02
## [595,] 0.266544426 0.0339238361 1.439193e-03
## [596,] 0.416337988 0.3211750193 8.258786e-02
## [597,] 0.443086838 0.2436977611 4.467792e-02
## [598,] 0.275519452 0.4362391326 2.302373e-01
## [599,] 0.444358195 0.2275981001 3.885821e-02
## [600,] 0.291090430 0.4308138364 2.125348e-01
## [601,] 0.195398778 0.4422182874 3.336033e-01
## [602,] 0.444358195 0.2275981001 3.885821e-02
## [603,] 0.377630828 0.0906313987 7.250512e-03
## [604,] 0.417093250 0.1331148669 1.416116e-02
## [605,] 0.433331375 0.1637029640 2.061445e-02
## [606,] 0.442218287 0.1953987782 2.877966e-02
## [607,] 0.417093250 0.1331148669 1.416116e-02
## [608,] 0.386693968 0.3625255950 1.132892e-01
## [609,] 0.397531973 0.3493462791 1.023338e-01
## [610,] 0.211473264 0.4440938538 3.108657e-01
## [611,] 0.340371253 0.0654560102 4.195898e-03
## [612,] 0.340371253 0.0654560102 4.195898e-03
## [613,] 0.386693968 0.3625255950 1.132892e-01
## [614,] 0.360146521 0.0776786613 5.584740e-03
## [615,] 0.443086838 0.2436977611 4.467792e-02
## [616,] 0.406028666 0.1184250277 1.151354e-02
## [617,] 0.443086838 0.2436977611 4.467792e-02
## [618,] 0.436239133 0.2755194522 5.800410e-02
## [619,] 0.438655970 0.1794501695 2.447048e-02
## [620,] 0.444358195 0.2275981001 3.885821e-02
## [621,] 0.424154946 0.3063341278 7.374710e-02
## [622,] 0.430813836 0.2910904300 6.556091e-02
## [623,] 0.424154946 0.3063341278 7.374710e-02
## [624,] 0.360146521 0.0776786613 5.584740e-03
## [625,] 0.375000000 0.3750000000 1.250000e-01
## [626,] 0.407438488 0.3355375785 9.210835e-02
## [627,] 0.440355309 0.2596967205 5.105149e-02
## [628,] 0.335537578 0.4074384881 1.649156e-01
## [629,] 0.430813836 0.2910904300 6.556091e-02
## [630,] 0.444093854 0.2114732637 3.356718e-02
## [631,] 0.436239133 0.2755194522 5.800410e-02
## [632,] 0.275519452 0.4362391326 2.302373e-01
## [633,] 0.444358195 0.2275981001 3.885821e-02
## [634,] 0.417093250 0.1331148669 1.416116e-02
## [635,] 0.417093250 0.1331148669 1.416116e-02
## [636,] 0.440355309 0.2596967205 5.105149e-02
## [637,] 0.424154946 0.3063341278 7.374710e-02
## [638,] 0.416337988 0.3211750193 8.258786e-02
## [639,] 0.360146521 0.0776786613 5.584740e-03
## [640,] 0.436239133 0.2755194522 5.800410e-02
## [641,] 0.090631399 0.3776308281 5.244873e-01
## [642,] 0.397531973 0.3493462791 1.023338e-01
## [643,] 0.377630828 0.0906313987 7.250512e-03
## [644,] 0.375000000 0.3750000000 1.250000e-01
## [645,] 0.438655970 0.1794501695 2.447048e-02
## [646,] 0.424154946 0.3063341278 7.374710e-02
## [647,] 0.306334128 0.4241549461 1.957638e-01
## [648,] 0.436239133 0.2755194522 5.800410e-02
## [649,] 0.444358195 0.2275981001 3.885821e-02
## [650,] 0.377630828 0.0906313987 7.250512e-03
## [651,] 0.417093250 0.1331148669 1.416116e-02
## [652,] 0.340371253 0.0654560102 4.195898e-03
## [653,] 0.444093854 0.2114732637 3.356718e-02
## [654,] 0.377630828 0.0906313987 7.250512e-03
## [655,] 0.266544426 0.0339238361 1.439193e-03
## [656,] 0.293645732 0.0435030714 2.148300e-03
## [657,] 0.179450170 0.4386559699 3.574234e-01
## [658,] 0.406028666 0.1184250277 1.151354e-02
## [659,] 0.443086838 0.2436977611 4.467792e-02
## [660,] 0.375000000 0.3750000000 1.250000e-01
## [661,] 0.407438488 0.3355375785 9.210835e-02
## [662,] 0.436239133 0.2755194522 5.800410e-02
## [663,] 0.243697761 0.4430868383 2.685375e-01
## [664,] 0.377630828 0.0906313987 7.250512e-03
## [665,] 0.318229499 0.0540389715 3.058810e-03
## [666,] 0.291090430 0.4308138364 2.125348e-01
## [667,] 0.362525595 0.3866939680 1.374912e-01
## [668,] 0.291090430 0.4308138364 2.125348e-01
## [669,] 0.443086838 0.2436977611 4.467792e-02
## [670,] 0.406028666 0.1184250277 1.151354e-02
## [671,] 0.318229499 0.0540389715 3.058810e-03
## [672,] 0.375000000 0.3750000000 1.250000e-01
## [673,] 0.362525595 0.3866939680 1.374912e-01
## [674,] 0.259696720 0.4403553087 2.488965e-01
## [675,] 0.043503071 0.2936457319 6.607029e-01
## [676,] 0.438655970 0.1794501695 2.447048e-02
## [677,] 0.163702964 0.4333313752 3.823512e-01
## [678,] 0.407438488 0.3355375785 9.210835e-02
## [679,] 0.291090430 0.4308138364 2.125348e-01
## [680,] 0.424154946 0.3063341278 7.374710e-02
## [681,] 0.424154946 0.3063341278 7.374710e-02
## [682,] 0.406028666 0.1184250277 1.151354e-02
## [683,] 0.211473264 0.4440938538 3.108657e-01
## [684,] 0.436239133 0.2755194522 5.800410e-02
## [685,] 0.392899701 0.1042386963 9.218388e-03
## [686,] 0.306334128 0.4241549461 1.957638e-01
## [687,] 0.407438488 0.3355375785 9.210835e-02
## [688,] 0.362525595 0.3866939680 1.374912e-01
## [689,] 0.417093250 0.1331148669 1.416116e-02
## [690,] 0.426168977 0.1482326877 1.718640e-02
## [691,] 0.349346279 0.3975319727 1.507880e-01
## [692,] 0.417093250 0.1331148669 1.416116e-02
## [693,] 0.227598100 0.4443581954 2.891855e-01
## [694,] 0.340371253 0.0654560102 4.195898e-03
## [695,] 0.443086838 0.2436977611 4.467792e-02
## [696,] 0.360146521 0.0776786613 5.584740e-03
## [697,] 0.426168977 0.1482326877 1.718640e-02
## [698,] 0.266544426 0.0339238361 1.439193e-03
## [699,] 0.118425028 0.4060286664 4.640328e-01
## [700,] 0.430813836 0.2910904300 6.556091e-02
## [701,] 0.416337988 0.3211750193 8.258786e-02
## [702,] 0.433331375 0.1637029640 2.061445e-02
## [703,] 0.430813836 0.2910904300 6.556091e-02
## [704,] 0.375000000 0.3750000000 1.250000e-01
## [705,] 0.211473264 0.4440938538 3.108657e-01
## [706,] 0.291090430 0.4308138364 2.125348e-01
## [707,] 0.406028666 0.1184250277 1.151354e-02
## [708,] 0.321175019 0.4163379880 1.798991e-01
## [709,] 0.259696720 0.4403553087 2.488965e-01
## [710,] 0.227598100 0.4443581954 2.891855e-01
## [711,] 0.275519452 0.4362391326 2.302373e-01
## [712,] 0.211473264 0.4440938538 3.108657e-01
## [713,] 0.386693968 0.3625255950 1.132892e-01
## [714,] 0.444358195 0.2275981001 3.885821e-02
## [715,] 0.406028666 0.1184250277 1.151354e-02
## [716,] 0.349346279 0.3975319727 1.507880e-01
## [717,] 0.397531973 0.3493462791 1.023338e-01
## [718,] 0.424154946 0.3063341278 7.374710e-02
## [719,] 0.407438488 0.3355375785 9.210835e-02
## [720,] 0.236850055 0.0253767916 9.063140e-04
## [721,] 0.442218287 0.1953987782 2.877966e-02
## [722,] 0.392899701 0.1042386963 9.218388e-03
## [723,] 0.043503071 0.2936457319 6.607029e-01
## [724,] 0.362525595 0.3866939680 1.374912e-01
## [725,] 0.318229499 0.0540389715 3.058810e-03
## [726,] 0.318229499 0.0540389715 3.058810e-03
## [727,] 0.440355309 0.2596967205 5.105149e-02
## [728,] 0.090631399 0.0030210466 3.356718e-05
## [729,] 0.266544426 0.0339238361 1.439193e-03
## [730,] 0.440355309 0.2596967205 5.105149e-02
## [731,] 0.321175019 0.4163379880 1.798991e-01
## [732,] 0.416337988 0.3211750193 8.258786e-02
## [733,] 0.406028666 0.1184250277 1.151354e-02
## [734,] 0.397531973 0.3493462791 1.023338e-01
## [735,] 0.293645732 0.0435030714 2.148300e-03
## [736,] 0.406028666 0.1184250277 1.151354e-02
## [737,] 0.407438488 0.3355375785 9.210835e-02
## [738,] 0.397531973 0.3493462791 1.023338e-01
## [739,] 0.291090430 0.4308138364 2.125348e-01
## [740,] 0.375000000 0.3750000000 1.250000e-01
## [741,] 0.266544426 0.0339238361 1.439193e-03
## [742,] 0.211473264 0.4440938538 3.108657e-01
## [743,] 0.179450170 0.4386559699 3.574234e-01
## [744,] 0.163702964 0.4333313752 3.823512e-01
## [745,] 0.360146521 0.0776786613 5.584740e-03
## [746,] 0.349346279 0.3975319727 1.507880e-01
## [747,] 0.340371253 0.0654560102 4.195898e-03
## [748,] 0.438655970 0.1794501695 2.447048e-02
## [749,] 0.340371253 0.0654560102 4.195898e-03
## [750,] 0.444093854 0.2114732637 3.356718e-02
## [751,] 0.433331375 0.1637029640 2.061445e-02
## [752,] 0.440355309 0.2596967205 5.105149e-02
## [753,] 0.227598100 0.4443581954 2.891855e-01
## [754,] 0.349346279 0.3975319727 1.507880e-01
## [755,] 0.426168977 0.1482326877 1.718640e-02
## [756,] 0.406028666 0.1184250277 1.151354e-02
## [757,] 0.362525595 0.3866939680 1.374912e-01
## [758,] 0.266544426 0.0339238361 1.439193e-03
## [759,] 0.430813836 0.2910904300 6.556091e-02
## [760,] 0.362525595 0.3866939680 1.374912e-01
## [761,] 0.444358195 0.2275981001 3.885821e-02
## [762,] 0.406028666 0.1184250277 1.151354e-02
## [763,] 0.163702964 0.4333313752 3.823512e-01
## [764,] 0.104238696 0.3928997013 4.936432e-01
## [765,] 0.444358195 0.2275981001 3.885821e-02
## [766,] 0.397531973 0.3493462791 1.023338e-01
## [767,] 0.195398778 0.4422182874 3.336033e-01
## [768,] 0.195398778 0.4422182874 3.336033e-01
## [769,] 0.131453291 0.0066840657 1.132892e-04
## [770,] 0.397531973 0.3493462791 1.023338e-01
## [771,] 0.438655970 0.1794501695 2.447048e-02
## [772,] 0.438655970 0.1794501695 2.447048e-02
## [773,] 0.436239133 0.2755194522 5.800410e-02
## [774,] 0.306334128 0.4241549461 1.957638e-01
## [775,] 0.318229499 0.0540389715 3.058810e-03
## [776,] 0.438655970 0.1794501695 2.447048e-02
## [777,] 0.433331375 0.1637029640 2.061445e-02
## [778,] 0.436239133 0.2755194522 5.800410e-02
## [779,] 0.440355309 0.2596967205 5.105149e-02
## [780,] 0.433331375 0.1637029640 2.061445e-02
## [781,] 0.426168977 0.1482326877 1.718640e-02
## [782,] 0.406028666 0.1184250277 1.151354e-02
## [783,] 0.375000000 0.3750000000 1.250000e-01
## [784,] 0.377630828 0.0906313987 7.250512e-03
## [785,] 0.417093250 0.1331148669 1.416116e-02
## [786,] 0.442218287 0.1953987782 2.877966e-02
## [787,] 0.407438488 0.3355375785 9.210835e-02
## [788,] 0.163702964 0.4333313752 3.823512e-01
## [789,] 0.440355309 0.2596967205 5.105149e-02
## [790,] 0.443086838 0.2436977611 4.467792e-02
## [791,] 0.416337988 0.3211750193 8.258786e-02
## [792,] 0.386693968 0.3625255950 1.132892e-01
## [793,] 0.340371253 0.0654560102 4.195898e-03
## [794,] 0.133114867 0.4170932496 4.356307e-01
## [795,] 0.386693968 0.3625255950 1.132892e-01
## [796,] 0.377630828 0.0906313987 7.250512e-03
## [797,] 0.442218287 0.1953987782 2.877966e-02
## [798,] 0.433331375 0.1637029640 2.061445e-02
## [799,] 0.417093250 0.1331148669 1.416116e-02
## [800,] 0.440355309 0.2596967205 5.105149e-02
## [801,] 0.426168977 0.1482326877 1.718640e-02
## [802,] 0.375000000 0.3750000000 1.250000e-01
## [803,] 0.179450170 0.4386559699 3.574234e-01
## [804,] 0.392899701 0.1042386963 9.218388e-03
## [805,] 0.430813836 0.2910904300 6.556091e-02
## [806,] 0.386693968 0.3625255950 1.132892e-01
## [807,] 0.362525595 0.3866939680 1.374912e-01
## [808,] 0.335537578 0.4074384881 1.649156e-01
## [809,] 0.407438488 0.3355375785 9.210835e-02
## [810,] 0.443086838 0.2436977611 4.467792e-02
## [811,] 0.430813836 0.2910904300 6.556091e-02
## [812,] 0.306334128 0.4241549461 1.957638e-01
## [813,] 0.406028666 0.1184250277 1.151354e-02
## [814,] 0.340371253 0.0654560102 4.195898e-03
## [815,] 0.417093250 0.1331148669 1.416116e-02
## [816,] 0.440355309 0.2596967205 5.105149e-02
## [817,] 0.392899701 0.1042386963 9.218388e-03
## [818,] 0.386693968 0.3625255950 1.132892e-01
## [819,] 0.362525595 0.3866939680 1.374912e-01
## [820,] 0.397531973 0.3493462791 1.023338e-01
## [821,] 0.443086838 0.2436977611 4.467792e-02
## [822,] 0.306334128 0.4241549461 1.957638e-01
## [823,] 0.236850055 0.0253767916 9.063140e-04
## [824,] 0.426168977 0.1482326877 1.718640e-02
## [825,] 0.377630828 0.0906313987 7.250512e-03
## [826,] 0.433331375 0.1637029640 2.061445e-02
## [827,] 0.054038972 0.3182294988 6.246727e-01
## [828,] 0.444358195 0.2275981001 3.885821e-02
## [829,] 0.417093250 0.1331148669 1.416116e-02
## [830,] 0.011681380 0.1693800141 8.186701e-01
## [831,] 0.426168977 0.1482326877 1.718640e-02
## [832,] 0.293645732 0.0435030714 2.148300e-03
## [833,] 0.349346279 0.3975319727 1.507880e-01
## [834,] 0.266544426 0.0339238361 1.439193e-03
## [835,] 0.179450170 0.4386559699 3.574234e-01
## [836,] 0.442218287 0.1953987782 2.877966e-02
## [837,] 0.406028666 0.1184250277 1.151354e-02
## [838,] 0.438655970 0.1794501695 2.447048e-02
## [839,] 0.444358195 0.2275981001 3.885821e-02
## [840,] 0.407438488 0.3355375785 9.210835e-02
## [841,] 0.386693968 0.3625255950 1.132892e-01
## [842,] 0.362525595 0.3866939680 1.374912e-01
## [843,] 0.386693968 0.3625255950 1.132892e-01
## [844,] 0.397531973 0.3493462791 1.023338e-01
## [845,] 0.090631399 0.0030210466 3.356718e-05
## [846,] 0.211473264 0.4440938538 3.108657e-01
## [847,] 0.442218287 0.1953987782 2.877966e-02
## [848,] 0.306334128 0.4241549461 1.957638e-01
## [849,] 0.349346279 0.3975319727 1.507880e-01
## [850,] 0.433331375 0.1637029640 2.061445e-02
## [851,] 0.444093854 0.2114732637 3.356718e-02
## [852,] 0.179450170 0.4386559699 3.574234e-01
## [853,] 0.397531973 0.3493462791 1.023338e-01
## [854,] 0.340371253 0.0654560102 4.195898e-03
## [855,] 0.195398778 0.4422182874 3.336033e-01
## [856,] 0.293645732 0.0435030714 2.148300e-03
## [857,] 0.340371253 0.0654560102 4.195898e-03
## [858,] 0.436239133 0.2755194522 5.800410e-02
## [859,] 0.362525595 0.3866939680 1.374912e-01
## [860,] 0.407438488 0.3355375785 9.210835e-02
## [861,] 0.443086838 0.2436977611 4.467792e-02
## [862,] 0.444093854 0.2114732637 3.356718e-02
## [863,] 0.430813836 0.2910904300 6.556091e-02
## [864,] 0.430813836 0.2910904300 6.556091e-02
## [865,] 0.243697761 0.4430868383 2.685375e-01
## [866,] 0.211473264 0.4440938538 3.108657e-01
## [867,] 0.416337988 0.3211750193 8.258786e-02
## [868,] 0.397531973 0.3493462791 1.023338e-01
## [869,] 0.227598100 0.4443581954 2.891855e-01
## [870,] 0.438655970 0.1794501695 2.447048e-02
## [871,] 0.443086838 0.2436977611 4.467792e-02
## [872,] 0.436239133 0.2755194522 5.800410e-02
## [873,] 0.444093854 0.2114732637 3.356718e-02
## [874,] 0.243697761 0.4430868383 2.685375e-01
## [875,] 0.433331375 0.1637029640 2.061445e-02
## [876,] 0.377630828 0.0906313987 7.250512e-03
## [877,] 0.443086838 0.2436977611 4.467792e-02
## [878,] 0.426168977 0.1482326877 1.718640e-02
## [879,] 0.306334128 0.4241549461 1.957638e-01
## [880,] 0.362525595 0.3866939680 1.374912e-01
## [881,] 0.436239133 0.2755194522 5.800410e-02
## [882,] 0.416337988 0.3211750193 8.258786e-02
## [883,] 0.227598100 0.4443581954 2.891855e-01
## [884,] 0.424154946 0.3063341278 7.374710e-02
## [885,] 0.293645732 0.0435030714 2.148300e-03
## [886,] 0.443086838 0.2436977611 4.467792e-02
## [887,] 0.169380014 0.0116813803 2.685375e-04
## [888,] 0.430813836 0.2910904300 6.556091e-02
## [889,] 0.424154946 0.3063341278 7.374710e-02
## [890,] 0.321175019 0.4163379880 1.798991e-01
## [891,] 0.306334128 0.4241549461 1.957638e-01
## [892,] 0.291090430 0.4308138364 2.125348e-01
## [893,] 0.386693968 0.3625255950 1.132892e-01
## [894,] 0.444093854 0.2114732637 3.356718e-02
## [895,] 0.266544426 0.0339238361 1.439193e-03
## [896,] 0.227598100 0.4443581954 2.891855e-01
## [897,] 0.444093854 0.2114732637 3.356718e-02
## [898,] 0.443086838 0.2436977611 4.467792e-02
## [899,] 0.211473264 0.4440938538 3.108657e-01
## [900,] 0.426168977 0.1482326877 1.718640e-02
## [901,] 0.444358195 0.2275981001 3.885821e-02
## [902,] 0.293645732 0.0435030714 2.148300e-03
## [903,] 0.340371253 0.0654560102 4.195898e-03
## [904,] 0.318229499 0.0540389715 3.058810e-03
## [905,] 0.426168977 0.1482326877 1.718640e-02
## [906,] 0.444093854 0.2114732637 3.356718e-02
## [907,] 0.243697761 0.4430868383 2.685375e-01
## [908,] 0.436239133 0.2755194522 5.800410e-02
## [909,] 0.406028666 0.1184250277 1.151354e-02
## [910,] 0.318229499 0.0540389715 3.058810e-03
## [911,] 0.362525595 0.3866939680 1.374912e-01
## [912,] 0.266544426 0.0339238361 1.439193e-03
## [913,] 0.211473264 0.4440938538 3.108657e-01
## [914,] 0.179450170 0.4386559699 3.574234e-01
## [915,] 0.444358195 0.2275981001 3.885821e-02
## [916,] 0.204487093 0.0179374643 5.244873e-04
## [917,] 0.397531973 0.3493462791 1.023338e-01
## [918,] 0.406028666 0.1184250277 1.151354e-02
## [919,] 0.259696720 0.4403553087 2.488965e-01
## [920,] 0.443086838 0.2436977611 4.467792e-02
## [921,] 0.259696720 0.4403553087 2.488965e-01
## [922,] 0.340371253 0.0654560102 4.195898e-03
## [923,] 0.243697761 0.4430868383 2.685375e-01
## [924,] 0.440355309 0.2596967205 5.105149e-02
## [925,] 0.321175019 0.4163379880 1.798991e-01
## [926,] 0.318229499 0.0540389715 3.058810e-03
## [927,] 0.046838810 0.0007678494 4.195898e-06
## [928,] 0.204487093 0.0179374643 5.244873e-04
## [929,] 0.392899701 0.1042386963 9.218388e-03
## [930,] 0.436239133 0.2755194522 5.800410e-02
## [931,] 0.335537578 0.4074384881 1.649156e-01
## [932,] 0.090631399 0.0030210466 3.356718e-05
## [933,] 0.293645732 0.0435030714 2.148300e-03
## [934,] 0.443086838 0.2436977611 4.467792e-02
## [935,] 0.360146521 0.0776786613 5.584740e-03
## [936,] 0.442218287 0.1953987782 2.877966e-02
## [937,] 0.442218287 0.1953987782 2.877966e-02
## [938,] 0.169380014 0.0116813803 2.685375e-04
## [939,] 0.436239133 0.2755194522 5.800410e-02
## [940,] 0.424154946 0.3063341278 7.374710e-02
## [941,] 0.416337988 0.3211750193 8.258786e-02
## [942,] 0.436239133 0.2755194522 5.800410e-02
## [943,] 0.335537578 0.4074384881 1.649156e-01
## [944,] 0.407438488 0.3355375785 9.210835e-02
## [945,] 0.227598100 0.4443581954 2.891855e-01
## [946,] 0.335537578 0.4074384881 1.649156e-01
## [947,] 0.148232688 0.4261689772 4.084119e-01
## [948,] 0.416337988 0.3211750193 8.258786e-02
## [949,] 0.321175019 0.4163379880 1.798991e-01
## [950,] 0.340371253 0.0654560102 4.195898e-03
## [951,] 0.335537578 0.4074384881 1.649156e-01
## [952,] 0.440355309 0.2596967205 5.105149e-02
## [953,] 0.424154946 0.3063341278 7.374710e-02
## [954,] 0.386693968 0.3625255950 1.132892e-01
## [955,] 0.397531973 0.3493462791 1.023338e-01
## [956,] 0.392899701 0.1042386963 9.218388e-03
## [957,] 0.340371253 0.0654560102 4.195898e-03
## [958,] 0.416337988 0.3211750193 8.258786e-02
## [959,] 0.275519452 0.4362391326 2.302373e-01
## [960,] 0.397531973 0.3493462791 1.023338e-01
## [961,] 0.440355309 0.2596967205 5.105149e-02
## [962,] 0.340371253 0.0654560102 4.195898e-03
## [963,] 0.386693968 0.3625255950 1.132892e-01
## [964,] 0.397531973 0.3493462791 1.023338e-01
## [965,] 0.259696720 0.4403553087 2.488965e-01
## [966,] 0.444358195 0.2275981001 3.885821e-02
## [967,] 0.416337988 0.3211750193 8.258786e-02
## [968,] 0.335537578 0.4074384881 1.649156e-01
## [969,] 0.443086838 0.2436977611 4.467792e-02
## [970,] 0.386693968 0.3625255950 1.132892e-01
## [971,] 0.416337988 0.3211750193 8.258786e-02
## [972,] 0.259696720 0.4403553087 2.488965e-01
## [973,] 0.006684066 0.1314532913 8.617494e-01
## [974,] 0.386693968 0.3625255950 1.132892e-01
## [975,] 0.275519452 0.4362391326 2.302373e-01
## [976,] 0.444358195 0.2275981001 3.885821e-02
## [977,] 0.375000000 0.3750000000 1.250000e-01
## [978,] 0.243697761 0.4430868383 2.685375e-01
## [979,] 0.407438488 0.3355375785 9.210835e-02
## [980,] 0.444358195 0.2275981001 3.885821e-02
## [981,] 0.293645732 0.0435030714 2.148300e-03
## [982,] 0.397531973 0.3493462791 1.023338e-01
## [983,] 0.443086838 0.2436977611 4.467792e-02
## [984,] 0.195398778 0.4422182874 3.336033e-01
## [985,] 0.444093854 0.2114732637 3.356718e-02
## [986,] 0.000000000 0.0000000000 0.000000e+00
## [987,] 0.318229499 0.0540389715 3.058810e-03
## [988,] 0.360146521 0.0776786613 5.584740e-03
## [989,] 0.362525595 0.3866939680 1.374912e-01
## [990,] 0.266544426 0.0339238361 1.439193e-03
## [991,] 0.433331375 0.1637029640 2.061445e-02
## [992,] 0.440355309 0.2596967205 5.105149e-02
## [993,] 0.444093854 0.2114732637 3.356718e-02
## [994,] 0.375000000 0.3750000000 1.250000e-01
## [995,] 0.438655970 0.1794501695 2.447048e-02
## [996,] 0.118425028 0.4060286664 4.640328e-01
## [997,] 0.340371253 0.0654560102 4.195898e-03
## [998,] 0.436239133 0.2755194522 5.800410e-02
## [999,] 0.090631399 0.0030210466 3.356718e-05
## [1000,] 0.442218287 0.1953987782 2.877966e-02
## [1001,] 0.243697761 0.4430868383 2.685375e-01
## [1002,] 0.416337988 0.3211750193 8.258786e-02
## [1003,] 0.148232688 0.4261689772 4.084119e-01
## [1004,] 0.416337988 0.3211750193 8.258786e-02
## [1005,] 0.335537578 0.4074384881 1.649156e-01
## [1006,] 0.436239133 0.2755194522 5.800410e-02
## [1007,] 0.443086838 0.2436977611 4.467792e-02
## [1008,] 0.407438488 0.3355375785 9.210835e-02
## [1009,] 0.291090430 0.4308138364 2.125348e-01
## [1010,] 0.321175019 0.4163379880 1.798991e-01
## [1011,] 0.416337988 0.3211750193 8.258786e-02
## [1012,] 0.406028666 0.1184250277 1.151354e-02
## [1013,] 0.436239133 0.2755194522 5.800410e-02
## [1014,] 0.433331375 0.1637029640 2.061445e-02
## [1015,] 0.444093854 0.2114732637 3.356718e-02
## [1016,] 0.392899701 0.1042386963 9.218388e-03
## [1017,] 0.440355309 0.2596967205 5.105149e-02
## [1018,] 0.416337988 0.3211750193 8.258786e-02
## [1019,] 0.362525595 0.3866939680 1.374912e-01
## [1020,] 0.360146521 0.0776786613 5.584740e-03
## [1021,] 0.406028666 0.1184250277 1.151354e-02
## [1022,] 0.349346279 0.3975319727 1.507880e-01
## [1023,] 0.360146521 0.0776786613 5.584740e-03
## [1024,] 0.406028666 0.1184250277 1.151354e-02
## [1025,] 0.392899701 0.1042386963 9.218388e-03
## [1026,] 0.360146521 0.0776786613 5.584740e-03
## [1027,] 0.340371253 0.0654560102 4.195898e-03
## [1028,] 0.362525595 0.3866939680 1.374912e-01
## [1029,] 0.375000000 0.3750000000 1.250000e-01
## [1030,] 0.293645732 0.0435030714 2.148300e-03
## [1031,] 0.392899701 0.1042386963 9.218388e-03
## [1032,] 0.179450170 0.4386559699 3.574234e-01
## [1033,] 0.433331375 0.1637029640 2.061445e-02
## [1034,] 0.291090430 0.4308138364 2.125348e-01
## [1035,] 0.430813836 0.2910904300 6.556091e-02
## [1036,] 0.243697761 0.4430868383 2.685375e-01
## [1037,] 0.444093854 0.2114732637 3.356718e-02
## [1038,] 0.375000000 0.3750000000 1.250000e-01
## [1039,] 0.179450170 0.4386559699 3.574234e-01
## [1040,] 0.293645732 0.0435030714 2.148300e-03
## [1041,] 0.407438488 0.3355375785 9.210835e-02
## [1042,] 0.243697761 0.4430868383 2.685375e-01
## [1043,] 0.163702964 0.4333313752 3.823512e-01
## [1044,] 0.104238696 0.3928997013 4.936432e-01
## [1045,] 0.349346279 0.3975319727 1.507880e-01
## [1046,] 0.407438488 0.3355375785 9.210835e-02
## [1047,] 0.443086838 0.2436977611 4.467792e-02
## [1048,] 0.131453291 0.0066840657 1.132892e-04
## [1049,] 0.349346279 0.3975319727 1.507880e-01
## [1050,] 0.430813836 0.2910904300 6.556091e-02
## [1051,] 0.416337988 0.3211750193 8.258786e-02
## [1052,] 0.417093250 0.1331148669 1.416116e-02
## [1053,] 0.444093854 0.2114732637 3.356718e-02
## [1054,] 0.424154946 0.3063341278 7.374710e-02
## [1055,] 0.362525595 0.3866939680 1.374912e-01
## [1056,] 0.291090430 0.4308138364 2.125348e-01
## [1057,] 0.375000000 0.3750000000 1.250000e-01
## [1058,] 0.443086838 0.2436977611 4.467792e-02
## [1059,] 0.131453291 0.0066840657 1.132892e-04
## [1060,] 0.211473264 0.4440938538 3.108657e-01
## [1061,] 0.195398778 0.4422182874 3.336033e-01
## [1062,] 0.424154946 0.3063341278 7.374710e-02
## [1063,] 0.430813836 0.2910904300 6.556091e-02
## [1064,] 0.360146521 0.0776786613 5.584740e-03
## [1065,] 0.293645732 0.0435030714 2.148300e-03
## [1066,] 0.340371253 0.0654560102 4.195898e-03
## [1067,] 0.444093854 0.2114732637 3.356718e-02
## [1068,] 0.416337988 0.3211750193 8.258786e-02
## [1069,] 0.444358195 0.2275981001 3.885821e-02
## [1070,] 0.424154946 0.3063341278 7.374710e-02
## [1071,] 0.416337988 0.3211750193 8.258786e-02
## [1072,] 0.275519452 0.4362391326 2.302373e-01
## [1073,] 0.443086838 0.2436977611 4.467792e-02
## [1074,] 0.054038972 0.3182294988 6.246727e-01
## [1075,] 0.377630828 0.0906313987 7.250512e-03
## [1076,] 0.416337988 0.3211750193 8.258786e-02
## [1077,] 0.440355309 0.2596967205 5.105149e-02
## [1078,] 0.443086838 0.2436977611 4.467792e-02
## [1079,] 0.407438488 0.3355375785 9.210835e-02
## [1080,] 0.444093854 0.2114732637 3.356718e-02
## [1081,] 0.293645732 0.0435030714 2.148300e-03
## [1082,] 0.407438488 0.3355375785 9.210835e-02
## [1083,] 0.436239133 0.2755194522 5.800410e-02
## [1084,] 0.426168977 0.1482326877 1.718640e-02
## [1085,] 0.407438488 0.3355375785 9.210835e-02
## [1086,] 0.442218287 0.1953987782 2.877966e-02
## [1087,] 0.335537578 0.4074384881 1.649156e-01
## [1088,] 0.430813836 0.2910904300 6.556091e-02
## [1089,] 0.335537578 0.4074384881 1.649156e-01
## [1090,] 0.397531973 0.3493462791 1.023338e-01
## [1091,] 0.444093854 0.2114732637 3.356718e-02
## [1092,] 0.321175019 0.4163379880 1.798991e-01
## [1093,] 0.433331375 0.1637029640 2.061445e-02
## [1094,] 0.444358195 0.2275981001 3.885821e-02
## [1095,] 0.416337988 0.3211750193 8.258786e-02
## [1096,] 0.195398778 0.4422182874 3.336033e-01
## [1097,] 0.148232688 0.4261689772 4.084119e-01
## [1098,] 0.444358195 0.2275981001 3.885821e-02
## [1099,] 0.407438488 0.3355375785 9.210835e-02
## [1100,] 0.266544426 0.0339238361 1.439193e-03
## [1101,] 0.243697761 0.4430868383 2.685375e-01
## [1102,] 0.335537578 0.4074384881 1.649156e-01
## [1103,] 0.416337988 0.3211750193 8.258786e-02
## [1104,] 0.440355309 0.2596967205 5.105149e-02
## [1105,] 0.436239133 0.2755194522 5.800410e-02
## [1106,] 0.392899701 0.1042386963 9.218388e-03
## [1107,] 0.397531973 0.3493462791 1.023338e-01
## [1108,] 0.444358195 0.2275981001 3.885821e-02
## [1109,] 0.321175019 0.4163379880 1.798991e-01
## [1110,] 0.440355309 0.2596967205 5.105149e-02
## [1111,] 0.163702964 0.4333313752 3.823512e-01
## [1112,] 0.204487093 0.0179374643 5.244873e-04
## [1113,] 0.179450170 0.4386559699 3.574234e-01
## [1114,] 0.430813836 0.2910904300 6.556091e-02
## [1115,] 0.360146521 0.0776786613 5.584740e-03
## [1116,] 0.426168977 0.1482326877 1.718640e-02
## [1117,] 0.444093854 0.2114732637 3.356718e-02
## [1118,] 0.266544426 0.0339238361 1.439193e-03
## [1119,] 0.375000000 0.3750000000 1.250000e-01
## [1120,] 0.407438488 0.3355375785 9.210835e-02
## [1121,] 0.377630828 0.0906313987 7.250512e-03
## [1122,] 0.417093250 0.1331148669 1.416116e-02
## [1123,] 0.360146521 0.0776786613 5.584740e-03
## [1124,] 0.406028666 0.1184250277 1.151354e-02
## [1125,] 0.306334128 0.4241549461 1.957638e-01
## [1126,] 0.443086838 0.2436977611 4.467792e-02
## [1127,] 0.377630828 0.0906313987 7.250512e-03
## [1128,] 0.375000000 0.3750000000 1.250000e-01
## [1129,] 0.266544426 0.0339238361 1.439193e-03
## [1130,] 0.424154946 0.3063341278 7.374710e-02
## [1131,] 0.440355309 0.2596967205 5.105149e-02
## [1132,] 0.306334128 0.4241549461 1.957638e-01
## [1133,] 0.266544426 0.0339238361 1.439193e-03
## [1134,] 0.163702964 0.4333313752 3.823512e-01
## [1135,] 0.375000000 0.3750000000 1.250000e-01
## [1136,] 0.236850055 0.0253767916 9.063140e-04
## [1137,] 0.259696720 0.4403553087 2.488965e-01
## [1138,] 0.397531973 0.3493462791 1.023338e-01
## [1139,] 0.424154946 0.3063341278 7.374710e-02
## [1140,] 0.275519452 0.4362391326 2.302373e-01
## [1141,] 0.426168977 0.1482326877 1.718640e-02
## [1142,] 0.204487093 0.0179374643 5.244873e-04
## [1143,] 0.377630828 0.0906313987 7.250512e-03
## [1144,] 0.444093854 0.2114732637 3.356718e-02
## [1145,] 0.243697761 0.4430868383 2.685375e-01
## [1146,] 0.438655970 0.1794501695 2.447048e-02
## [1147,] 0.386693968 0.3625255950 1.132892e-01
## [1148,] 0.433331375 0.1637029640 2.061445e-02
## [1149,] 0.169380014 0.0116813803 2.685375e-04
## [1150,] 0.362525595 0.3866939680 1.374912e-01
## [1151,] 0.243697761 0.4430868383 2.685375e-01
## [1152,] 0.090631399 0.0030210466 3.356718e-05
## [1153,] 0.444358195 0.2275981001 3.885821e-02
## [1154,] 0.406028666 0.1184250277 1.151354e-02
## [1155,] 0.236850055 0.0253767916 9.063140e-04
## [1156,] 0.321175019 0.4163379880 1.798991e-01
## [1157,] 0.433331375 0.1637029640 2.061445e-02
## [1158,] 0.236850055 0.0253767916 9.063140e-04
## [1159,] 0.259696720 0.4403553087 2.488965e-01
## [1160,] 0.430813836 0.2910904300 6.556091e-02
## [1161,] 0.417093250 0.1331148669 1.416116e-02
## [1162,] 0.443086838 0.2436977611 4.467792e-02
## [1163,] 0.444358195 0.2275981001 3.885821e-02
## [1164,] 0.433331375 0.1637029640 2.061445e-02
## [1165,] 0.433331375 0.1637029640 2.061445e-02
## [1166,] 0.259696720 0.4403553087 2.488965e-01
## [1167,] 0.386693968 0.3625255950 1.132892e-01
## [1168,] 0.440355309 0.2596967205 5.105149e-02
## [1169,] 0.227598100 0.4443581954 2.891855e-01
## [1170,] 0.291090430 0.4308138364 2.125348e-01
## [1171,] 0.306334128 0.4241549461 1.957638e-01
## [1172,] 0.426168977 0.1482326877 1.718640e-02
## [1173,] 0.430813836 0.2910904300 6.556091e-02
## [1174,] 0.430813836 0.2910904300 6.556091e-02
## [1175,] 0.179450170 0.4386559699 3.574234e-01
## [1176,] 0.416337988 0.3211750193 8.258786e-02
## [1177,] 0.443086838 0.2436977611 4.467792e-02
## [1178,] 0.417093250 0.1331148669 1.416116e-02
## [1179,] 0.416337988 0.3211750193 8.258786e-02
## [1180,] 0.131453291 0.0066840657 1.132892e-04
## [1181,] 0.306334128 0.4241549461 1.957638e-01
## [1182,] 0.430813836 0.2910904300 6.556091e-02
## [1183,] 0.306334128 0.4241549461 1.957638e-01
## [1184,] 0.433331375 0.1637029640 2.061445e-02
## [1185,] 0.430813836 0.2910904300 6.556091e-02
## [1186,] 0.133114867 0.4170932496 4.356307e-01
## [1187,] 0.236850055 0.0253767916 9.063140e-04
## [1188,] 0.416337988 0.3211750193 8.258786e-02
## [1189,] 0.438655970 0.1794501695 2.447048e-02
## [1190,] 0.416337988 0.3211750193 8.258786e-02
## [1191,] 0.417093250 0.1331148669 1.416116e-02
## [1192,] 0.442218287 0.1953987782 2.877966e-02
## [1193,] 0.204487093 0.0179374643 5.244873e-04
## [1194,] 0.195398778 0.4422182874 3.336033e-01
## [1195,] 0.397531973 0.3493462791 1.023338e-01
## [1196,] 0.360146521 0.0776786613 5.584740e-03
## [1197,] 0.442218287 0.1953987782 2.877966e-02
## [1198,] 0.259696720 0.4403553087 2.488965e-01
## [1199,] 0.444358195 0.2275981001 3.885821e-02
## [1200,] 0.227598100 0.4443581954 2.891855e-01
## [1201,] 0.392899701 0.1042386963 9.218388e-03
## [1202,] 0.293645732 0.0435030714 2.148300e-03
## [1203,] 0.349346279 0.3975319727 1.507880e-01
## [1204,] 0.362525595 0.3866939680 1.374912e-01
## [1205,] 0.406028666 0.1184250277 1.151354e-02
## [1206,] 0.211473264 0.4440938538 3.108657e-01
## [1207,] 0.440355309 0.2596967205 5.105149e-02
## [1208,] 0.406028666 0.1184250277 1.151354e-02
## [1209,] 0.293645732 0.0435030714 2.148300e-03
## [1210,] 0.440355309 0.2596967205 5.105149e-02
## [1211,] 0.362525595 0.3866939680 1.374912e-01
## [1212,] 0.430813836 0.2910904300 6.556091e-02
## [1213,] 0.046838810 0.0007678494 4.195898e-06
## [1214,] 0.436239133 0.2755194522 5.800410e-02
## [1215,] 0.321175019 0.4163379880 1.798991e-01
## [1216,] 0.169380014 0.0116813803 2.685375e-04
## [1217,] 0.375000000 0.3750000000 1.250000e-01
## [1218,] 0.417093250 0.1331148669 1.416116e-02
## [1219,] 0.392899701 0.1042386963 9.218388e-03
## [1220,] 0.430813836 0.2910904300 6.556091e-02
## [1221,] 0.259696720 0.4403553087 2.488965e-01
## [1222,] 0.386693968 0.3625255950 1.132892e-01
## [1223,] 0.243697761 0.4430868383 2.685375e-01
## [1224,] 0.362525595 0.3866939680 1.374912e-01
## [1225,] 0.335537578 0.4074384881 1.649156e-01
## [1226,] 0.386693968 0.3625255950 1.132892e-01
## [1227,] 0.321175019 0.4163379880 1.798991e-01
## [1228,] 0.430813836 0.2910904300 6.556091e-02
## [1229,] 0.266544426 0.0339238361 1.439193e-03
## [1230,] 0.433331375 0.1637029640 2.061445e-02
## [1231,] 0.438655970 0.1794501695 2.447048e-02
## [1232,] 0.430813836 0.2910904300 6.556091e-02
## [1233,] 0.440355309 0.2596967205 5.105149e-02
## [1234,] 0.335537578 0.4074384881 1.649156e-01
## [1235,] 0.386693968 0.3625255950 1.132892e-01
## [1236,] 0.349346279 0.3975319727 1.507880e-01
## [1237,] 0.442218287 0.1953987782 2.877966e-02
## [1238,] 0.386693968 0.3625255950 1.132892e-01
## [1239,] 0.436239133 0.2755194522 5.800410e-02
## [1240,] 0.430813836 0.2910904300 6.556091e-02
## [1241,] 0.444093854 0.2114732637 3.356718e-02
## [1242,] 0.204487093 0.0179374643 5.244873e-04
## [1243,] 0.306334128 0.4241549461 1.957638e-01
## [1244,] 0.118425028 0.4060286664 4.640328e-01
## [1245,] 0.397531973 0.3493462791 1.023338e-01
## [1246,] 0.433331375 0.1637029640 2.061445e-02
## [1247,] 0.433331375 0.1637029640 2.061445e-02
## [1248,] 0.443086838 0.2436977611 4.467792e-02
## [1249,] 0.440355309 0.2596967205 5.105149e-02
## [1250,] 0.443086838 0.2436977611 4.467792e-02
## [1251,] 0.362525595 0.3866939680 1.374912e-01
## [1252,] 0.433331375 0.1637029640 2.061445e-02
## [1253,] 0.430813836 0.2910904300 6.556091e-02
## [1254,] 0.293645732 0.0435030714 2.148300e-03
## [1255,] 0.195398778 0.4422182874 3.336033e-01
## [1256,] 0.362525595 0.3866939680 1.374912e-01
## [1257,] 0.169380014 0.0116813803 2.685375e-04
## [1258,] 0.179450170 0.4386559699 3.574234e-01
## [1259,] 0.291090430 0.4308138364 2.125348e-01
## [1260,] 0.360146521 0.0776786613 5.584740e-03
## [1261,] 0.444358195 0.2275981001 3.885821e-02
## [1262,] 0.054038972 0.3182294988 6.246727e-01
## [1263,] 0.169380014 0.0116813803 2.685375e-04
## [1264,] 0.386693968 0.3625255950 1.132892e-01
## [1265,] 0.433331375 0.1637029640 2.061445e-02
## [1266,] 0.407438488 0.3355375785 9.210835e-02
## [1267,] 0.291090430 0.4308138364 2.125348e-01
## [1268,] 0.438655970 0.1794501695 2.447048e-02
## [1269,] 0.259696720 0.4403553087 2.488965e-01
## [1270,] 0.211473264 0.4440938538 3.108657e-01
## [1271,] 0.440355309 0.2596967205 5.105149e-02
## [1272,] 0.275519452 0.4362391326 2.302373e-01
## [1273,] 0.406028666 0.1184250277 1.151354e-02
## [1274,] 0.438655970 0.1794501695 2.447048e-02
## [1275,] 0.340371253 0.0654560102 4.195898e-03
## [1276,] 0.211473264 0.4440938538 3.108657e-01
## [1277,] 0.440355309 0.2596967205 5.105149e-02
## [1278,] 0.291090430 0.4308138364 2.125348e-01
## [1279,] 0.407438488 0.3355375785 9.210835e-02
## [1280,] 0.179450170 0.4386559699 3.574234e-01
## [1281,] 0.424154946 0.3063341278 7.374710e-02
## [1282,] 0.438655970 0.1794501695 2.447048e-02
## [1283,] 0.440355309 0.2596967205 5.105149e-02
## [1284,] 0.169380014 0.0116813803 2.685375e-04
## [1285,] 0.349346279 0.3975319727 1.507880e-01
## [1286,] 0.259696720 0.4403553087 2.488965e-01
## [1287,] 0.291090430 0.4308138364 2.125348e-01
## [1288,] 0.438655970 0.1794501695 2.447048e-02
## [1289,] 0.406028666 0.1184250277 1.151354e-02
## [1290,] 0.438655970 0.1794501695 2.447048e-02
## [1291,] 0.340371253 0.0654560102 4.195898e-03
## [1292,] 0.444358195 0.2275981001 3.885821e-02
## [1293,] 0.436239133 0.2755194522 5.800410e-02
## [1294,] 0.291090430 0.4308138364 2.125348e-01
## [1295,] 0.444358195 0.2275981001 3.885821e-02
## [1296,] 0.436239133 0.2755194522 5.800410e-02
## [1297,] 0.417093250 0.1331148669 1.416116e-02
## [1298,] 0.204487093 0.0179374643 5.244873e-04
## [1299,] 0.259696720 0.4403553087 2.488965e-01
## [1300,] 0.318229499 0.0540389715 3.058810e-03
## [1301,] 0.266544426 0.0339238361 1.439193e-03
## [1302,] 0.318229499 0.0540389715 3.058810e-03
## [1303,] 0.417093250 0.1331148669 1.416116e-02
## [1304,] 0.169380014 0.0116813803 2.685375e-04
## [1305,] 0.397531973 0.3493462791 1.023338e-01
## [1306,] 0.397531973 0.3493462791 1.023338e-01
## [1307,] 0.392899701 0.1042386963 9.218388e-03
## [1308,] 0.407438488 0.3355375785 9.210835e-02
## [1309,] 0.397531973 0.3493462791 1.023338e-01
## [1310,] 0.443086838 0.2436977611 4.467792e-02
## [1311,] 0.349346279 0.3975319727 1.507880e-01
## [1312,] 0.392899701 0.1042386963 9.218388e-03
## [1313,] 0.243697761 0.4430868383 2.685375e-01
## [1314,] 0.386693968 0.3625255950 1.132892e-01
## [1315,] 0.306334128 0.4241549461 1.957638e-01
## [1316,] 0.275519452 0.4362391326 2.302373e-01
## [1317,] 0.195398778 0.4422182874 3.336033e-01
## [1318,] 0.406028666 0.1184250277 1.151354e-02
## [1319,] 0.211473264 0.4440938538 3.108657e-01
## [1320,] 0.436239133 0.2755194522 5.800410e-02
## [1321,] 0.321175019 0.4163379880 1.798991e-01
## [1322,] 0.406028666 0.1184250277 1.151354e-02
## [1323,] 0.362525595 0.3866939680 1.374912e-01
## [1324,] 0.443086838 0.2436977611 4.467792e-02
## [1325,] 0.436239133 0.2755194522 5.800410e-02
## [1326,] 0.433331375 0.1637029640 2.061445e-02
## [1327,] 0.417093250 0.1331148669 1.416116e-02
## [1328,] 0.417093250 0.1331148669 1.416116e-02
## [1329,] 0.444093854 0.2114732637 3.356718e-02
## [1330,] 0.436239133 0.2755194522 5.800410e-02
## [1331,] 0.243697761 0.4430868383 2.685375e-01
## [1332,] 0.416337988 0.3211750193 8.258786e-02
## [1333,] 0.377630828 0.0906313987 7.250512e-03
## [1334,] 0.426168977 0.1482326877 1.718640e-02
## [1335,] 0.430813836 0.2910904300 6.556091e-02
## [1336,] 0.424154946 0.3063341278 7.374710e-02
## [1337,] 0.340371253 0.0654560102 4.195898e-03
## [1338,] 0.407438488 0.3355375785 9.210835e-02
## [1339,] 0.438655970 0.1794501695 2.447048e-02
## [1340,] 0.442218287 0.1953987782 2.877966e-02
## [1341,] 0.397531973 0.3493462791 1.023338e-01
## [1342,] 0.444093854 0.2114732637 3.356718e-02
## [1343,] 0.440355309 0.2596967205 5.105149e-02
## [1344,] 0.179450170 0.4386559699 3.574234e-01
## [1345,] 0.443086838 0.2436977611 4.467792e-02
## [1346,] 0.424154946 0.3063341278 7.374710e-02
## [1347,] 0.275519452 0.4362391326 2.302373e-01
## [1348,] 0.349346279 0.3975319727 1.507880e-01
## [1349,] 0.335537578 0.4074384881 1.649156e-01
## [1350,] 0.318229499 0.0540389715 3.058810e-03
## [1351,] 0.335537578 0.4074384881 1.649156e-01
## [1352,] 0.349346279 0.3975319727 1.507880e-01
## [1353,] 0.340371253 0.0654560102 4.195898e-03
## [1354,] 0.375000000 0.3750000000 1.250000e-01
## [1355,] 0.195398778 0.4422182874 3.336033e-01
## [1356,] 0.204487093 0.0179374643 5.244873e-04
## [1357,] 0.321175019 0.4163379880 1.798991e-01
## [1358,] 0.291090430 0.4308138364 2.125348e-01
## [1359,] 0.386693968 0.3625255950 1.132892e-01
## [1360,] 0.362525595 0.3866939680 1.374912e-01
## [1361,] 0.392899701 0.1042386963 9.218388e-03
## [1362,] 0.321175019 0.4163379880 1.798991e-01
## [1363,] 0.430813836 0.2910904300 6.556091e-02
## [1364,] 0.090631399 0.0030210466 3.356718e-05
## [1365,] 0.407438488 0.3355375785 9.210835e-02
## [1366,] 0.275519452 0.4362391326 2.302373e-01
## [1367,] 0.424154946 0.3063341278 7.374710e-02
## [1368,] 0.204487093 0.0179374643 5.244873e-04
## [1369,] 0.436239133 0.2755194522 5.800410e-02
## [1370,] 0.406028666 0.1184250277 1.151354e-02
## [1371,] 0.430813836 0.2910904300 6.556091e-02
## [1372,] 0.259696720 0.4403553087 2.488965e-01
## [1373,] 0.104238696 0.3928997013 4.936432e-01
## [1374,] 0.375000000 0.3750000000 1.250000e-01
## [1375,] 0.360146521 0.0776786613 5.584740e-03
## [1376,] 0.433331375 0.1637029640 2.061445e-02
## [1377,] 0.444358195 0.2275981001 3.885821e-02
## [1378,] 0.417093250 0.1331148669 1.416116e-02
## [1379,] 0.321175019 0.4163379880 1.798991e-01
## [1380,] 0.430813836 0.2910904300 6.556091e-02
## [1381,] 0.438655970 0.1794501695 2.447048e-02
## [1382,] 0.444093854 0.2114732637 3.356718e-02
## [1383,] 0.243697761 0.4430868383 2.685375e-01
## [1384,] 0.416337988 0.3211750193 8.258786e-02
## [1385,] 0.426168977 0.1482326877 1.718640e-02
## [1386,] 0.377630828 0.0906313987 7.250512e-03
## [1387,] 0.131453291 0.0066840657 1.132892e-04
## [1388,] 0.236850055 0.0253767916 9.063140e-04
## [1389,] 0.386693968 0.3625255950 1.132892e-01
## [1390,] 0.392899701 0.1042386963 9.218388e-03
## [1391,] 0.424154946 0.3063341278 7.374710e-02
## [1392,] 0.377630828 0.0906313987 7.250512e-03
## [1393,] 0.406028666 0.1184250277 1.151354e-02
## [1394,] 0.444358195 0.2275981001 3.885821e-02
## [1395,] 0.436239133 0.2755194522 5.800410e-02
## [1396,] 0.236850055 0.0253767916 9.063140e-04
## [1397,] 0.424154946 0.3063341278 7.374710e-02
## [1398,] 0.377630828 0.0906313987 7.250512e-03
## [1399,] 0.243697761 0.4430868383 2.685375e-01
## [1400,] 0.275519452 0.4362391326 2.302373e-01
## [1401,] 0.340371253 0.0654560102 4.195898e-03
## [1402,] 0.169380014 0.0116813803 2.685375e-04
## [1403,] 0.442218287 0.1953987782 2.877966e-02
## [1404,] 0.000000000 0.0000000000 0.000000e+00
## [1405,] 0.430813836 0.2910904300 6.556091e-02
## [1406,] 0.438655970 0.1794501695 2.447048e-02
## [1407,] 0.397531973 0.3493462791 1.023338e-01
## [1408,] 0.335537578 0.4074384881 1.649156e-01
## [1409,] 0.426168977 0.1482326877 1.718640e-02
## [1410,] 0.179450170 0.4386559699 3.574234e-01
## [1411,] 0.386693968 0.3625255950 1.132892e-01
## [1412,] 0.433331375 0.1637029640 2.061445e-02
## [1413,] 0.436239133 0.2755194522 5.800410e-02
## [1414,] 0.426168977 0.1482326877 1.718640e-02
## [1415,] 0.362525595 0.3866939680 1.374912e-01
## [1416,] 0.362525595 0.3866939680 1.374912e-01
## [1417,] 0.275519452 0.4362391326 2.302373e-01
## [1418,] 0.362525595 0.3866939680 1.374912e-01
## [1419,] 0.424154946 0.3063341278 7.374710e-02
## [1420,] 0.377630828 0.0906313987 7.250512e-03
## [1421,] 0.426168977 0.1482326877 1.718640e-02
## [1422,] 0.362525595 0.3866939680 1.374912e-01
## [1423,] 0.349346279 0.3975319727 1.507880e-01
## [1424,] 0.443086838 0.2436977611 4.467792e-02
## [1425,] 0.426168977 0.1482326877 1.718640e-02
## [1426,] 0.438655970 0.1794501695 2.447048e-02
## [1427,] 0.424154946 0.3063341278 7.374710e-02
## [1428,] 0.438655970 0.1794501695 2.447048e-02
## [1429,] 0.179450170 0.4386559699 3.574234e-01
## [1430,] 0.417093250 0.1331148669 1.416116e-02
## [1431,] 0.424154946 0.3063341278 7.374710e-02
## [1432,] 0.000000000 0.0000000000 1.000000e+00
## [1433,] 0.416337988 0.3211750193 8.258786e-02
## [1434,] 0.243697761 0.4430868383 2.685375e-01
## [1435,] 0.349346279 0.3975319727 1.507880e-01
## [1436,] 0.340371253 0.0654560102 4.195898e-03
## [1437,] 0.442218287 0.1953987782 2.877966e-02
## [1438,] 0.275519452 0.4362391326 2.302373e-01
## [1439,] 0.275519452 0.4362391326 2.302373e-01
## [1440,] 0.426168977 0.1482326877 1.718640e-02
## [1441,] 0.438655970 0.1794501695 2.447048e-02
## [1442,] 0.416337988 0.3211750193 8.258786e-02
## [1443,] 0.438655970 0.1794501695 2.447048e-02
## [1444,] 0.204487093 0.0179374643 5.244873e-04
## [1445,] 0.417093250 0.1331148669 1.416116e-02
## [1446,] 0.386693968 0.3625255950 1.132892e-01
## [1447,] 0.340371253 0.0654560102 4.195898e-03
## [1448,] 0.442218287 0.1953987782 2.877966e-02
## [1449,] 0.169380014 0.0116813803 2.685375e-04
## [1450,] 0.211473264 0.4440938538 3.108657e-01
## [1451,] 0.377630828 0.0906313987 7.250512e-03
## [1452,] 0.362525595 0.3866939680 1.374912e-01
## [1453,] 0.291090430 0.4308138364 2.125348e-01
## [1454,] 0.293645732 0.0435030714 2.148300e-03
## [1455,] 0.436239133 0.2755194522 5.800410e-02
## [1456,] 0.054038972 0.3182294988 6.246727e-01
## [1457,] 0.417093250 0.1331148669 1.416116e-02
## [1458,] 0.375000000 0.3750000000 1.250000e-01
## [1459,] 0.416337988 0.3211750193 8.258786e-02
## [1460,] 0.440355309 0.2596967205 5.105149e-02
## [1461,] 0.227598100 0.4443581954 2.891855e-01
## [1462,] 0.417093250 0.1331148669 1.416116e-02
## [1463,] 0.204487093 0.0179374643 5.244873e-04
## [1464,] 0.406028666 0.1184250277 1.151354e-02
## [1465,] 0.377630828 0.0906313987 7.250512e-03
## [1466,] 0.306334128 0.4241549461 1.957638e-01
## [1467,] 0.362525595 0.3866939680 1.374912e-01
## [1468,] 0.259696720 0.4403553087 2.488965e-01
## [1469,] 0.377630828 0.0906313987 7.250512e-03
## [1470,] 0.406028666 0.1184250277 1.151354e-02
## [1471,] 0.386693968 0.3625255950 1.132892e-01
## [1472,] 0.392899701 0.1042386963 9.218388e-03
## [1473,] 0.362525595 0.3866939680 1.374912e-01
## [1474,] 0.397531973 0.3493462791 1.023338e-01
## [1475,] 0.442218287 0.1953987782 2.877966e-02
## [1476,] 0.236850055 0.0253767916 9.063140e-04
## [1477,] 0.321175019 0.4163379880 1.798991e-01
## [1478,] 0.444358195 0.2275981001 3.885821e-02
## [1479,] 0.397531973 0.3493462791 1.023338e-01
## [1480,] 0.438655970 0.1794501695 2.447048e-02
## [1481,] 0.426168977 0.1482326877 1.718640e-02
## [1482,] 0.416337988 0.3211750193 8.258786e-02
## [1483,] 0.211473264 0.4440938538 3.108657e-01
## [1484,] 0.430813836 0.2910904300 6.556091e-02
## [1485,] 0.433331375 0.1637029640 2.061445e-02
## [1486,] 0.362525595 0.3866939680 1.374912e-01
## [1487,] 0.275519452 0.4362391326 2.302373e-01
## [1488,] 0.433331375 0.1637029640 2.061445e-02
## [1489,] 0.204487093 0.0179374643 5.244873e-04
## [1490,] 0.416337988 0.3211750193 8.258786e-02
## [1491,] 0.306334128 0.4241549461 1.957638e-01
## [1492,] 0.436239133 0.2755194522 5.800410e-02
## [1493,] 0.349346279 0.3975319727 1.507880e-01
## [1494,] 0.375000000 0.3750000000 1.250000e-01
## [1495,] 0.386693968 0.3625255950 1.132892e-01
## [1496,] 0.362525595 0.3866939680 1.374912e-01
## [1497,] 0.442218287 0.1953987782 2.877966e-02
## [1498,] 0.444093854 0.2114732637 3.356718e-02
## [1499,] 0.243697761 0.4430868383 2.685375e-01
## [1500,] 0.349346279 0.3975319727 1.507880e-01
## [1501,] 0.349346279 0.3975319727 1.507880e-01
## [1502,] 0.424154946 0.3063341278 7.374710e-02
## [1503,] 0.430813836 0.2910904300 6.556091e-02
## [1504,] 0.227598100 0.4443581954 2.891855e-01
## [1505,] 0.195398778 0.4422182874 3.336033e-01
## [1506,] 0.443086838 0.2436977611 4.467792e-02
## [1507,] 0.291090430 0.4308138364 2.125348e-01
## [1508,] 0.440355309 0.2596967205 5.105149e-02
## [1509,] 0.118425028 0.4060286664 4.640328e-01
## [1510,] 0.195398778 0.4422182874 3.336033e-01
## [1511,] 0.426168977 0.1482326877 1.718640e-02
## [1512,] 0.440355309 0.2596967205 5.105149e-02
## [1513,] 0.386693968 0.3625255950 1.132892e-01
## [1514,] 0.306334128 0.4241549461 1.957638e-01
## [1515,] 0.424154946 0.3063341278 7.374710e-02
## [1516,] 0.259696720 0.4403553087 2.488965e-01
## [1517,] 0.321175019 0.4163379880 1.798991e-01
## [1518,] 0.179450170 0.4386559699 3.574234e-01
## [1519,] 0.443086838 0.2436977611 4.467792e-02
## [1520,] 0.444358195 0.2275981001 3.885821e-02
## [1521,] 0.416337988 0.3211750193 8.258786e-02
## [1522,] 0.440355309 0.2596967205 5.105149e-02
## [1523,] 0.293645732 0.0435030714 2.148300e-03
## [1524,] 0.335537578 0.4074384881 1.649156e-01
## [1525,] 0.392899701 0.1042386963 9.218388e-03
## [1526,] 0.163702964 0.4333313752 3.823512e-01
## [1527,] 0.436239133 0.2755194522 5.800410e-02
## [1528,] 0.335537578 0.4074384881 1.649156e-01
## [1529,] 0.444093854 0.2114732637 3.356718e-02
## [1530,] 0.360146521 0.0776786613 5.584740e-03
## [1531,] 0.436239133 0.2755194522 5.800410e-02
## [1532,] 0.407438488 0.3355375785 9.210835e-02
## [1533,] 0.131453291 0.0066840657 1.132892e-04
## [1534,] 0.436239133 0.2755194522 5.800410e-02
## [1535,] 0.386693968 0.3625255950 1.132892e-01
## [1536,] 0.306334128 0.4241549461 1.957638e-01
## [1537,] 0.000000000 0.0000000000 1.000000e+00
## [1538,] 0.442218287 0.1953987782 2.877966e-02
## [1539,] 0.440355309 0.2596967205 5.105149e-02
## [1540,] 0.442218287 0.1953987782 2.877966e-02
## [1541,] 0.306334128 0.4241549461 1.957638e-01
## [1542,] 0.444358195 0.2275981001 3.885821e-02
## [1543,] 0.131453291 0.0066840657 1.132892e-04
## [1544,] 0.227598100 0.4443581954 2.891855e-01
## [1545,] 0.360146521 0.0776786613 5.584740e-03
## [1546,] 0.360146521 0.0776786613 5.584740e-03
## [1547,] 0.416337988 0.3211750193 8.258786e-02
## [1548,] 0.321175019 0.4163379880 1.798991e-01
## [1549,] 0.275519452 0.4362391326 2.302373e-01
## [1550,] 0.131453291 0.0066840657 1.132892e-04
## [1551,] 0.444358195 0.2275981001 3.885821e-02
## [1552,] 0.377630828 0.0906313987 7.250512e-03
## [1553,] 0.436239133 0.2755194522 5.800410e-02
## [1554,] 0.443086838 0.2436977611 4.467792e-02
## [1555,] 0.397531973 0.3493462791 1.023338e-01
## [1556,] 0.430813836 0.2910904300 6.556091e-02
## [1557,] 0.436239133 0.2755194522 5.800410e-02
## [1558,] 0.444358195 0.2275981001 3.885821e-02
## [1559,] 0.362525595 0.3866939680 1.374912e-01
## [1560,] 0.211473264 0.4440938538 3.108657e-01
## [1561,] 0.259696720 0.4403553087 2.488965e-01
## [1562,] 0.444093854 0.2114732637 3.356718e-02
## [1563,] 0.375000000 0.3750000000 1.250000e-01
## [1564,] 0.349346279 0.3975319727 1.507880e-01
## [1565,] 0.417093250 0.1331148669 1.416116e-02
## [1566,] 0.227598100 0.4443581954 2.891855e-01
## [1567,] 0.440355309 0.2596967205 5.105149e-02
## [1568,] 0.417093250 0.1331148669 1.416116e-02
## [1569,] 0.340371253 0.0654560102 4.195898e-03
## [1570,] 0.375000000 0.3750000000 1.250000e-01
## [1571,] 0.293645732 0.0435030714 2.148300e-03
## [1572,] 0.169380014 0.0116813803 2.685375e-04
## [1573,] 0.397531973 0.3493462791 1.023338e-01
## [1574,] 0.227598100 0.4443581954 2.891855e-01
## [1575,] 0.416337988 0.3211750193 8.258786e-02
## [1576,] 0.444358195 0.2275981001 3.885821e-02
## [1577,] 0.438655970 0.1794501695 2.447048e-02
## [1578,] 0.195398778 0.4422182874 3.336033e-01
## [1579,] 0.426168977 0.1482326877 1.718640e-02
## [1580,] 0.335537578 0.4074384881 1.649156e-01
## [1581,] 0.417093250 0.1331148669 1.416116e-02
## [1582,] 0.438655970 0.1794501695 2.447048e-02
## [1583,] 0.444358195 0.2275981001 3.885821e-02
## [1584,] 0.227598100 0.4443581954 2.891855e-01
## [1585,] 0.443086838 0.2436977611 4.467792e-02
## [1586,] 0.375000000 0.3750000000 1.250000e-01
## [1587,] 0.444358195 0.2275981001 3.885821e-02
## [1588,] 0.443086838 0.2436977611 4.467792e-02
## [1589,] 0.204487093 0.0179374643 5.244873e-04
## [1590,] 0.046838810 0.0007678494 4.195898e-06
## [1591,] 0.397531973 0.3493462791 1.023338e-01
## [1592,] 0.430813836 0.2910904300 6.556091e-02
## [1593,] 0.443086838 0.2436977611 4.467792e-02
## [1594,] 0.444093854 0.2114732637 3.356718e-02
## [1595,] 0.163702964 0.4333313752 3.823512e-01
## [1596,] 0.416337988 0.3211750193 8.258786e-02
## [1597,] 0.442218287 0.1953987782 2.877966e-02
## [1598,] 0.440355309 0.2596967205 5.105149e-02
## [1599,] 0.416337988 0.3211750193 8.258786e-02
## [1600,] 0.169380014 0.0116813803 2.685375e-04
## [1601,] 0.243697761 0.4430868383 2.685375e-01
## [1602,] 0.424154946 0.3063341278 7.374710e-02
## [1603,] 0.443086838 0.2436977611 4.467792e-02
## [1604,] 0.417093250 0.1331148669 1.416116e-02
## [1605,] 0.433331375 0.1637029640 2.061445e-02
## [1606,] 0.163702964 0.4333313752 3.823512e-01
## [1607,] 0.440355309 0.2596967205 5.105149e-02
## [1608,] 0.416337988 0.3211750193 8.258786e-02
## [1609,] 0.433331375 0.1637029640 2.061445e-02
## [1610,] 0.335537578 0.4074384881 1.649156e-01
## [1611,] 0.397531973 0.3493462791 1.023338e-01
## [1612,] 0.443086838 0.2436977611 4.467792e-02
## [1613,] 0.386693968 0.3625255950 1.132892e-01
## [1614,] 0.360146521 0.0776786613 5.584740e-03
## [1615,] 0.375000000 0.3750000000 1.250000e-01
## [1616,] 0.406028666 0.1184250277 1.151354e-02
## [1617,] 0.440355309 0.2596967205 5.105149e-02
## [1618,] 0.243697761 0.4430868383 2.685375e-01
## [1619,] 0.440355309 0.2596967205 5.105149e-02
## [1620,] 0.426168977 0.1482326877 1.718640e-02
## [1621,] 0.430813836 0.2910904300 6.556091e-02
## [1622,] 0.407438488 0.3355375785 9.210835e-02
## [1623,] 0.433331375 0.1637029640 2.061445e-02
## [1624,] 0.436239133 0.2755194522 5.800410e-02
## [1625,] 0.397531973 0.3493462791 1.023338e-01
## [1626,] 0.416337988 0.3211750193 8.258786e-02
## [1627,] 0.426168977 0.1482326877 1.718640e-02
## [1628,] 0.259696720 0.4403553087 2.488965e-01
## [1629,] 0.349346279 0.3975319727 1.507880e-01
## [1630,] 0.318229499 0.0540389715 3.058810e-03
## [1631,] 0.426168977 0.1482326877 1.718640e-02
## [1632,] 0.386693968 0.3625255950 1.132892e-01
## [1633,] 0.204487093 0.0179374643 5.244873e-04
## [1634,] 0.440355309 0.2596967205 5.105149e-02
## [1635,] 0.375000000 0.3750000000 1.250000e-01
## [1636,] 0.397531973 0.3493462791 1.023338e-01
## [1637,] 0.362525595 0.3866939680 1.374912e-01
## [1638,] 0.291090430 0.4308138364 2.125348e-01
## [1639,] 0.416337988 0.3211750193 8.258786e-02
## [1640,] 0.169380014 0.0116813803 2.685375e-04
## [1641,] 0.436239133 0.2755194522 5.800410e-02
## [1642,] 0.397531973 0.3493462791 1.023338e-01
## [1643,] 0.386693968 0.3625255950 1.132892e-01
## [1644,] 0.349346279 0.3975319727 1.507880e-01
## [1645,] 0.243697761 0.4430868383 2.685375e-01
## [1646,] 0.406028666 0.1184250277 1.151354e-02
## [1647,] 0.375000000 0.3750000000 1.250000e-01
## [1648,] 0.033923836 0.2665444262 6.980925e-01
## [1649,] 0.000000000 0.0000000000 0.000000e+00
## [1650,] 0.340371253 0.0654560102 4.195898e-03
## [1651,] 0.349346279 0.3975319727 1.507880e-01
## [1652,] 0.424154946 0.3063341278 7.374710e-02
## [1653,] 0.424154946 0.3063341278 7.374710e-02
## [1654,] 0.386693968 0.3625255950 1.132892e-01
## [1655,] 0.179450170 0.4386559699 3.574234e-01
## [1656,] 0.306334128 0.4241549461 1.957638e-01
## [1657,] 0.386693968 0.3625255950 1.132892e-01
## [1658,] 0.033923836 0.2665444262 6.980925e-01
## [1659,] 0.377630828 0.0906313987 7.250512e-03
## [1660,] 0.440355309 0.2596967205 5.105149e-02
## [1661,] 0.443086838 0.2436977611 4.467792e-02
## [1662,] 0.306334128 0.4241549461 1.957638e-01
## [1663,] 0.417093250 0.1331148669 1.416116e-02
## [1664,] 0.392899701 0.1042386963 9.218388e-03
## [1665,] 0.416337988 0.3211750193 8.258786e-02
## [1666,] 0.443086838 0.2436977611 4.467792e-02
## [1667,] 0.392899701 0.1042386963 9.218388e-03
## [1668,] 0.046838810 0.0007678494 4.195898e-06
## [1669,] 0.430813836 0.2910904300 6.556091e-02
## [1670,] 0.275519452 0.4362391326 2.302373e-01
## [1671,] 0.375000000 0.3750000000 1.250000e-01
## [1672,] 0.436239133 0.2755194522 5.800410e-02
## [1673,] 0.318229499 0.0540389715 3.058810e-03
## [1674,] 0.426168977 0.1482326877 1.718640e-02
## [1675,] 0.397531973 0.3493462791 1.023338e-01
## [1676,] 0.433331375 0.1637029640 2.061445e-02
## [1677,] 0.417093250 0.1331148669 1.416116e-02
## [1678,] 0.433331375 0.1637029640 2.061445e-02
## [1679,] 0.443086838 0.2436977611 4.467792e-02
## [1680,] 0.321175019 0.4163379880 1.798991e-01
## [1681,] 0.426168977 0.1482326877 1.718640e-02
## [1682,] 0.407438488 0.3355375785 9.210835e-02
## [1683,] 0.424154946 0.3063341278 7.374710e-02
## [1684,] 0.444093854 0.2114732637 3.356718e-02
## [1685,] 0.438655970 0.1794501695 2.447048e-02
## [1686,] 0.318229499 0.0540389715 3.058810e-03
## [1687,] 0.417093250 0.1331148669 1.416116e-02
## [1688,] 0.275519452 0.4362391326 2.302373e-01
## [1689,] 0.417093250 0.1331148669 1.416116e-02
## [1690,] 0.406028666 0.1184250277 1.151354e-02
## [1691,] 0.444358195 0.2275981001 3.885821e-02
## [1692,] 0.321175019 0.4163379880 1.798991e-01
## [1693,] 0.438655970 0.1794501695 2.447048e-02
## [1694,] 0.443086838 0.2436977611 4.467792e-02
## [1695,] 0.349346279 0.3975319727 1.507880e-01
## [1696,] 0.443086838 0.2436977611 4.467792e-02
## [1697,] 0.275519452 0.4362391326 2.302373e-01
## [1698,] 0.362525595 0.3866939680 1.374912e-01
## [1699,] 0.375000000 0.3750000000 1.250000e-01
## [1700,] 0.406028666 0.1184250277 1.151354e-02
## [1701,] 0.386693968 0.3625255950 1.132892e-01
## [1702,] 0.406028666 0.1184250277 1.151354e-02
## [1703,] 0.377630828 0.0906313987 7.250512e-03
## [1704,] 0.377630828 0.0906313987 7.250512e-03
## [1705,] 0.417093250 0.1331148669 1.416116e-02
## [1706,] 0.275519452 0.4362391326 2.302373e-01
## [1707,] 0.407438488 0.3355375785 9.210835e-02
## [1708,] 0.375000000 0.3750000000 1.250000e-01
## [1709,] 0.236850055 0.0253767916 9.063140e-04
## [1710,] 0.386693968 0.3625255950 1.132892e-01
## [1711,] 0.321175019 0.4163379880 1.798991e-01
## [1712,] 0.426168977 0.1482326877 1.718640e-02
## [1713,] 0.275519452 0.4362391326 2.302373e-01
## [1714,] 0.443086838 0.2436977611 4.467792e-02
## [1715,] 0.266544426 0.0339238361 1.439193e-03
## [1716,] 0.433331375 0.1637029640 2.061445e-02
## [1717,] 0.443086838 0.2436977611 4.467792e-02
## [1718,] 0.362525595 0.3866939680 1.374912e-01
## [1719,] 0.386693968 0.3625255950 1.132892e-01
## [1720,] 0.443086838 0.2436977611 4.467792e-02
## [1721,] 0.416337988 0.3211750193 8.258786e-02
## [1722,] 0.377630828 0.0906313987 7.250512e-03
## [1723,] 0.426168977 0.1482326877 1.718640e-02
## [1724,] 0.406028666 0.1184250277 1.151354e-02
## [1725,] 0.321175019 0.4163379880 1.798991e-01
## [1726,] 0.406028666 0.1184250277 1.151354e-02
## [1727,] 0.444358195 0.2275981001 3.885821e-02
## [1728,] 0.349346279 0.3975319727 1.507880e-01
## [1729,] 0.118425028 0.4060286664 4.640328e-01
## [1730,] 0.438655970 0.1794501695 2.447048e-02
## [1731,] 0.416337988 0.3211750193 8.258786e-02
## [1732,] 0.442218287 0.1953987782 2.877966e-02
## [1733,] 0.375000000 0.3750000000 1.250000e-01
## [1734,] 0.321175019 0.4163379880 1.798991e-01
## [1735,] 0.118425028 0.4060286664 4.640328e-01
## [1736,] 0.243697761 0.4430868383 2.685375e-01
## [1737,] 0.306334128 0.4241549461 1.957638e-01
## [1738,] 0.236850055 0.0253767916 9.063140e-04
## [1739,] 0.179450170 0.4386559699 3.574234e-01
## [1740,] 0.163702964 0.4333313752 3.823512e-01
## [1741,] 0.416337988 0.3211750193 8.258786e-02
## [1742,] 0.204487093 0.0179374643 5.244873e-04
## [1743,] 0.392899701 0.1042386963 9.218388e-03
## [1744,] 0.424154946 0.3063341278 7.374710e-02
## [1745,] 0.430813836 0.2910904300 6.556091e-02
## [1746,] 0.386693968 0.3625255950 1.132892e-01
## [1747,] 0.291090430 0.4308138364 2.125348e-01
## [1748,] 0.416337988 0.3211750193 8.258786e-02
## [1749,] 0.386693968 0.3625255950 1.132892e-01
## [1750,] 0.163702964 0.4333313752 3.823512e-01
## [1751,] 0.259696720 0.4403553087 2.488965e-01
## [1752,] 0.077678661 0.3601465208 5.565901e-01
## [1753,] 0.392899701 0.1042386963 9.218388e-03
## [1754,] 0.430813836 0.2910904300 6.556091e-02
## [1755,] 0.046838810 0.0007678494 4.195898e-06
## [1756,] 0.424154946 0.3063341278 7.374710e-02
## [1757,] 0.360146521 0.0776786613 5.584740e-03
## [1758,] 0.293645732 0.0435030714 2.148300e-03
## [1759,] 0.442218287 0.1953987782 2.877966e-02
## [1760,] 0.377630828 0.0906313987 7.250512e-03
## [1761,] 0.424154946 0.3063341278 7.374710e-02
## [1762,] 0.386693968 0.3625255950 1.132892e-01
## [1763,] 0.442218287 0.1953987782 2.877966e-02
## [1764,] 0.377630828 0.0906313987 7.250512e-03
## [1765,] 0.407438488 0.3355375785 9.210835e-02
## [1766,] 0.442218287 0.1953987782 2.877966e-02
## [1767,] 0.243697761 0.4430868383 2.685375e-01
## [1768,] 0.335537578 0.4074384881 1.649156e-01
## [1769,] 0.436239133 0.2755194522 5.800410e-02
## [1770,] 0.407438488 0.3355375785 9.210835e-02
## [1771,] 0.430813836 0.2910904300 6.556091e-02
## [1772,] 0.438655970 0.1794501695 2.447048e-02
## [1773,] 0.443086838 0.2436977611 4.467792e-02
## [1774,] 0.090631399 0.0030210466 3.356718e-05
## [1775,] 0.406028666 0.1184250277 1.151354e-02
## [1776,] 0.392899701 0.1042386963 9.218388e-03
## [1777,] 0.340371253 0.0654560102 4.195898e-03
## [1778,] 0.440355309 0.2596967205 5.105149e-02
## [1779,] 0.436239133 0.2755194522 5.800410e-02
## [1780,] 0.046838810 0.0007678494 4.195898e-06
## [1781,] 0.148232688 0.4261689772 4.084119e-01
## [1782,] 0.442218287 0.1953987782 2.877966e-02
## [1783,] 0.236850055 0.0253767916 9.063140e-04
## [1784,] 0.293645732 0.0435030714 2.148300e-03
## [1785,] 0.424154946 0.3063341278 7.374710e-02
## [1786,] 0.444358195 0.2275981001 3.885821e-02
## [1787,] 0.321175019 0.4163379880 1.798991e-01
## [1788,] 0.436239133 0.2755194522 5.800410e-02
## [1789,] 0.424154946 0.3063341278 7.374710e-02
## [1790,] 0.266544426 0.0339238361 1.439193e-03
## [1791,] 0.407438488 0.3355375785 9.210835e-02
## [1792,] 0.377630828 0.0906313987 7.250512e-03
## [1793,] 0.444093854 0.2114732637 3.356718e-02
## [1794,] 0.362525595 0.3866939680 1.374912e-01
## [1795,] 0.204487093 0.0179374643 5.244873e-04
## [1796,] 0.407438488 0.3355375785 9.210835e-02
## [1797,] 0.195398778 0.4422182874 3.336033e-01
## [1798,] 0.227598100 0.4443581954 2.891855e-01
## [1799,] 0.259696720 0.4403553087 2.488965e-01
## [1800,] 0.266544426 0.0339238361 1.439193e-03
## [1801,] 0.386693968 0.3625255950 1.132892e-01
## [1802,] 0.335537578 0.4074384881 1.649156e-01
## [1803,] 0.424154946 0.3063341278 7.374710e-02
## [1804,] 0.443086838 0.2436977611 4.467792e-02
## [1805,] 0.430813836 0.2910904300 6.556091e-02
## [1806,] 0.430813836 0.2910904300 6.556091e-02
## [1807,] 0.436239133 0.2755194522 5.800410e-02
## [1808,] 0.438655970 0.1794501695 2.447048e-02
## [1809,] 0.438655970 0.1794501695 2.447048e-02
## [1810,] 0.054038972 0.3182294988 6.246727e-01
## [1811,] 0.090631399 0.0030210466 3.356718e-05
## [1812,] 0.204487093 0.0179374643 5.244873e-04
## [1813,] 0.436239133 0.2755194522 5.800410e-02
## [1814,] 0.440355309 0.2596967205 5.105149e-02
## [1815,] 0.318229499 0.0540389715 3.058810e-03
## [1816,] 0.360146521 0.0776786613 5.584740e-03
## [1817,] 0.169380014 0.0116813803 2.685375e-04
## [1818,] 0.444358195 0.2275981001 3.885821e-02
## [1819,] 0.362525595 0.3866939680 1.374912e-01
## [1820,] 0.436239133 0.2755194522 5.800410e-02
## [1821,] 0.444093854 0.2114732637 3.356718e-02
## [1822,] 0.291090430 0.4308138364 2.125348e-01
## [1823,] 0.397531973 0.3493462791 1.023338e-01
## [1824,] 0.335537578 0.4074384881 1.649156e-01
## [1825,] 0.275519452 0.4362391326 2.302373e-01
## [1826,] 0.377630828 0.0906313987 7.250512e-03
## [1827,] 0.407438488 0.3355375785 9.210835e-02
## [1828,] 0.430813836 0.2910904300 6.556091e-02
## [1829,] 0.077678661 0.3601465208 5.565901e-01
## [1830,] 0.090631399 0.3776308281 5.244873e-01
## [1831,] 0.444358195 0.2275981001 3.885821e-02
## [1832,] 0.118425028 0.4060286664 4.640328e-01
## [1833,] 0.377630828 0.0906313987 7.250512e-03
## [1834,] 0.375000000 0.3750000000 1.250000e-01
## [1835,] 0.306334128 0.4241549461 1.957638e-01
## [1836,] 0.386693968 0.3625255950 1.132892e-01
## [1837,] 0.442218287 0.1953987782 2.877966e-02
## [1838,] 0.407438488 0.3355375785 9.210835e-02
## [1839,] 0.321175019 0.4163379880 1.798991e-01
## [1840,] 0.000000000 0.0000000000 0.000000e+00
## [1841,] 0.375000000 0.3750000000 1.250000e-01
## [1842,] 0.444358195 0.2275981001 3.885821e-02
## [1843,] 0.443086838 0.2436977611 4.467792e-02
## [1844,] 0.442218287 0.1953987782 2.877966e-02
## [1845,] 0.236850055 0.0253767916 9.063140e-04
## [1846,] 0.433331375 0.1637029640 2.061445e-02
## [1847,] 0.424154946 0.3063341278 7.374710e-02
## [1848,] 0.443086838 0.2436977611 4.467792e-02
## [1849,] 0.444358195 0.2275981001 3.885821e-02
## [1850,] 0.436239133 0.2755194522 5.800410e-02
## [1851,] 0.442218287 0.1953987782 2.877966e-02
## [1852,] 0.243697761 0.4430868383 2.685375e-01
## [1853,] 0.443086838 0.2436977611 4.467792e-02
## [1854,] 0.318229499 0.0540389715 3.058810e-03
## [1855,] 0.392899701 0.1042386963 9.218388e-03
## [1856,] 0.424154946 0.3063341278 7.374710e-02
## [1857,] 0.444093854 0.2114732637 3.356718e-02
## [1858,] 0.440355309 0.2596967205 5.105149e-02
## [1859,] 0.291090430 0.4308138364 2.125348e-01
## [1860,] 0.444093854 0.2114732637 3.356718e-02
## [1861,] 0.417093250 0.1331148669 1.416116e-02
## [1862,] 0.430813836 0.2910904300 6.556091e-02
## [1863,] 0.266544426 0.0339238361 1.439193e-03
## [1864,] 0.443086838 0.2436977611 4.467792e-02
## [1865,] 0.430813836 0.2910904300 6.556091e-02
## [1866,] 0.436239133 0.2755194522 5.800410e-02
## [1867,] 0.444093854 0.2114732637 3.356718e-02
## [1868,] 0.424154946 0.3063341278 7.374710e-02
## [1869,] 0.046838810 0.0007678494 4.195898e-06
## [1870,] 0.424154946 0.3063341278 7.374710e-02
## [1871,] 0.406028666 0.1184250277 1.151354e-02
## [1872,] 0.433331375 0.1637029640 2.061445e-02
## [1873,] 0.426168977 0.1482326877 1.718640e-02
## [1874,] 0.211473264 0.4440938538 3.108657e-01
## [1875,] 0.306334128 0.4241549461 1.957638e-01
## [1876,] 0.392899701 0.1042386963 9.218388e-03
## [1877,] 0.397531973 0.3493462791 1.023338e-01
## [1878,] 0.433331375 0.1637029640 2.061445e-02
## [1879,] 0.433331375 0.1637029640 2.061445e-02
## [1880,] 0.442218287 0.1953987782 2.877966e-02
## [1881,] 0.318229499 0.0540389715 3.058810e-03
## [1882,] 0.148232688 0.4261689772 4.084119e-01
## [1883,] 0.335537578 0.4074384881 1.649156e-01
## [1884,] 0.293645732 0.0435030714 2.148300e-03
## [1885,] 0.440355309 0.2596967205 5.105149e-02
## [1886,] 0.169380014 0.0116813803 2.685375e-04
## [1887,] 0.407438488 0.3355375785 9.210835e-02
## [1888,] 0.444358195 0.2275981001 3.885821e-02
## [1889,] 0.204487093 0.0179374643 5.244873e-04
## [1890,] 0.375000000 0.3750000000 1.250000e-01
## [1891,] 0.424154946 0.3063341278 7.374710e-02
## [1892,] 0.090631399 0.0030210466 3.356718e-05
## [1893,] 0.430813836 0.2910904300 6.556091e-02
## [1894,] 0.436239133 0.2755194522 5.800410e-02
## [1895,] 0.417093250 0.1331148669 1.416116e-02
## [1896,] 0.179450170 0.4386559699 3.574234e-01
## [1897,] 0.430813836 0.2910904300 6.556091e-02
## [1898,] 0.407438488 0.3355375785 9.210835e-02
## [1899,] 0.000000000 0.0000000000 0.000000e+00
## [1900,] 0.430813836 0.2910904300 6.556091e-02
## [1901,] 0.424154946 0.3063341278 7.374710e-02
## [1902,] 0.204487093 0.0179374643 5.244873e-04
## [1903,] 0.438655970 0.1794501695 2.447048e-02
## [1904,] 0.443086838 0.2436977611 4.467792e-02
## [1905,] 0.293645732 0.0435030714 2.148300e-03
## [1906,] 0.293645732 0.0435030714 2.148300e-03
## [1907,] 0.397531973 0.3493462791 1.023338e-01
## [1908,] 0.243697761 0.4430868383 2.685375e-01
## [1909,] 0.259696720 0.4403553087 2.488965e-01
## [1910,] 0.377630828 0.0906313987 7.250512e-03
## [1911,] 0.424154946 0.3063341278 7.374710e-02
## [1912,] 0.360146521 0.0776786613 5.584740e-03
## [1913,] 0.442218287 0.1953987782 2.877966e-02
## [1914,] 0.426168977 0.1482326877 1.718640e-02
## [1915,] 0.362525595 0.3866939680 1.374912e-01
## [1916,] 0.444093854 0.2114732637 3.356718e-02
## [1917,] 0.291090430 0.4308138364 2.125348e-01
## [1918,] 0.444358195 0.2275981001 3.885821e-02
## [1919,] 0.291090430 0.4308138364 2.125348e-01
## [1920,] 0.436239133 0.2755194522 5.800410e-02
## [1921,] 0.444358195 0.2275981001 3.885821e-02
## [1922,] 0.397531973 0.3493462791 1.023338e-01
## [1923,] 0.443086838 0.2436977611 4.467792e-02
## [1924,] 0.349346279 0.3975319727 1.507880e-01
## [1925,] 0.340371253 0.0654560102 4.195898e-03
## [1926,] 0.321175019 0.4163379880 1.798991e-01
## [1927,] 0.306334128 0.4241549461 1.957638e-01
## [1928,] 0.349346279 0.3975319727 1.507880e-01
## [1929,] 0.417093250 0.1331148669 1.416116e-02
## [1930,] 0.291090430 0.4308138364 2.125348e-01
## [1931,] 0.424154946 0.3063341278 7.374710e-02
## [1932,] 0.443086838 0.2436977611 4.467792e-02
## [1933,] 0.293645732 0.0435030714 2.148300e-03
## [1934,] 0.430813836 0.2910904300 6.556091e-02
## [1935,] 0.430813836 0.2910904300 6.556091e-02
## [1936,] 0.424154946 0.3063341278 7.374710e-02
## [1937,] 0.426168977 0.1482326877 1.718640e-02
## [1938,] 0.349346279 0.3975319727 1.507880e-01
## [1939,] 0.436239133 0.2755194522 5.800410e-02
## [1940,] 0.211473264 0.4440938538 3.108657e-01
## [1941,] 0.438655970 0.1794501695 2.447048e-02
## [1942,] 0.211473264 0.4440938538 3.108657e-01
## [1943,] 0.169380014 0.0116813803 2.685375e-04
## [1944,] 0.440355309 0.2596967205 5.105149e-02
## [1945,] 0.275519452 0.4362391326 2.302373e-01
## [1946,] 0.375000000 0.3750000000 1.250000e-01
## [1947,] 0.416337988 0.3211750193 8.258786e-02
## [1948,] 0.335537578 0.4074384881 1.649156e-01
## [1949,] 0.377630828 0.0906313987 7.250512e-03
## [1950,] 0.360146521 0.0776786613 5.584740e-03
## [1951,] 0.204487093 0.0179374643 5.244873e-04
## [1952,] 0.386693968 0.3625255950 1.132892e-01
## [1953,] 0.424154946 0.3063341278 7.374710e-02
## [1954,] 0.179450170 0.4386559699 3.574234e-01
## [1955,] 0.417093250 0.1331148669 1.416116e-02
## [1956,] 0.349346279 0.3975319727 1.507880e-01
## [1957,] 0.204487093 0.0179374643 5.244873e-04
## [1958,] 0.397531973 0.3493462791 1.023338e-01
## [1959,] 0.426168977 0.1482326877 1.718640e-02
## [1960,] 0.426168977 0.1482326877 1.718640e-02
## [1961,] 0.430813836 0.2910904300 6.556091e-02
## [1962,] 0.443086838 0.2436977611 4.467792e-02
## [1963,] 0.321175019 0.4163379880 1.798991e-01
## [1964,] 0.406028666 0.1184250277 1.151354e-02
## [1965,] 0.386693968 0.3625255950 1.132892e-01
## [1966,] 0.443086838 0.2436977611 4.467792e-02
## [1967,] 0.430813836 0.2910904300 6.556091e-02
## [1968,] 0.275519452 0.4362391326 2.302373e-01
## [1969,] 0.291090430 0.4308138364 2.125348e-01
## [1970,] 0.444093854 0.2114732637 3.356718e-02
## [1971,] 0.443086838 0.2436977611 4.467792e-02
## [1972,] 0.444358195 0.2275981001 3.885821e-02
## [1973,] 0.362525595 0.3866939680 1.374912e-01
## [1974,] 0.377630828 0.0906313987 7.250512e-03
## [1975,] 0.275519452 0.4362391326 2.302373e-01
## [1976,] 0.430813836 0.2910904300 6.556091e-02
## [1977,] 0.430813836 0.2910904300 6.556091e-02
## [1978,] 0.104238696 0.3928997013 4.936432e-01
## [1979,] 0.362525595 0.3866939680 1.374912e-01
## [1980,] 0.227598100 0.4443581954 2.891855e-01
## [1981,] 0.349346279 0.3975319727 1.507880e-01
## [1982,] 0.306334128 0.4241549461 1.957638e-01
## [1983,] 0.025376792 0.2368500554 7.368668e-01
## [1984,] 0.335537578 0.4074384881 1.649156e-01
## [1985,] 0.442218287 0.1953987782 2.877966e-02
## [1986,] 0.266544426 0.0339238361 1.439193e-03
## [1987,] 0.118425028 0.4060286664 4.640328e-01
## [1988,] 0.397531973 0.3493462791 1.023338e-01
## [1989,] 0.424154946 0.3063341278 7.374710e-02
## [1990,] 0.442218287 0.1953987782 2.877966e-02
## [1991,] 0.406028666 0.1184250277 1.151354e-02
## [1992,] 0.430813836 0.2910904300 6.556091e-02
## [1993,] 0.293645732 0.0435030714 2.148300e-03
## [1994,] 0.444358195 0.2275981001 3.885821e-02
## [1995,] 0.416337988 0.3211750193 8.258786e-02
## [1996,] 0.443086838 0.2436977611 4.467792e-02
## [1997,] 0.349346279 0.3975319727 1.507880e-01
## [1998,] 0.335537578 0.4074384881 1.649156e-01
## [1999,] 0.430813836 0.2910904300 6.556091e-02
## [2000,] 0.340371253 0.0654560102 4.195898e-03
## [2001,] 0.293645732 0.0435030714 2.148300e-03
## [2002,] 0.416337988 0.3211750193 8.258786e-02
## [2003,] 0.426168977 0.1482326877 1.718640e-02
## [2004,] 0.033923836 0.2665444262 6.980925e-01
## [2005,] 0.392899701 0.1042386963 9.218388e-03
## [2006,] 0.360146521 0.0776786613 5.584740e-03
## [2007,] 0.443086838 0.2436977611 4.467792e-02
## [2008,] 0.436239133 0.2755194522 5.800410e-02
## [2009,] 0.362525595 0.3866939680 1.374912e-01
## [2010,] 0.349346279 0.3975319727 1.507880e-01
## [2011,] 0.266544426 0.0339238361 1.439193e-03
## [2012,] 0.321175019 0.4163379880 1.798991e-01
## [2013,] 0.443086838 0.2436977611 4.467792e-02
## [2014,] 0.424154946 0.3063341278 7.374710e-02
## [2015,] 0.417093250 0.1331148669 1.416116e-02
## [2016,] 0.360146521 0.0776786613 5.584740e-03
## [2017,] 0.318229499 0.0540389715 3.058810e-03
## [2018,] 0.443086838 0.2436977611 4.467792e-02
## [2019,] 0.438655970 0.1794501695 2.447048e-02
## [2020,] 0.275519452 0.4362391326 2.302373e-01
## [2021,] 0.426168977 0.1482326877 1.718640e-02
## [2022,] 0.195398778 0.4422182874 3.336033e-01
## [2023,] 0.444093854 0.2114732637 3.356718e-02
## [2024,] 0.291090430 0.4308138364 2.125348e-01
## [2025,] 0.236850055 0.0253767916 9.063140e-04
## [2026,] 0.169380014 0.0116813803 2.685375e-04
## [2027,] 0.444093854 0.2114732637 3.356718e-02
## [2028,] 0.360146521 0.0776786613 5.584740e-03
## [2029,] 0.377630828 0.0906313987 7.250512e-03
## [2030,] 0.444093854 0.2114732637 3.356718e-02
## [2031,] 0.375000000 0.3750000000 1.250000e-01
## [2032,] 0.054038972 0.3182294988 6.246727e-01
## [2033,] 0.406028666 0.1184250277 1.151354e-02
## [2034,] 0.406028666 0.1184250277 1.151354e-02
## [2035,] 0.443086838 0.2436977611 4.467792e-02
## [2036,] 0.266544426 0.0339238361 1.439193e-03
## [2037,] 0.438655970 0.1794501695 2.447048e-02
## [2038,] 0.227598100 0.4443581954 2.891855e-01
## [2039,] 0.375000000 0.3750000000 1.250000e-01
## [2040,] 0.436239133 0.2755194522 5.800410e-02
## [2041,] 0.227598100 0.4443581954 2.891855e-01
## [2042,] 0.318229499 0.0540389715 3.058810e-03
## [2043,] 0.377630828 0.0906313987 7.250512e-03
## [2044,] 0.306334128 0.4241549461 1.957638e-01
## [2045,] 0.426168977 0.1482326877 1.718640e-02
## [2046,] 0.397531973 0.3493462791 1.023338e-01
## [2047,] 0.360146521 0.0776786613 5.584740e-03
## [2048,] 0.440355309 0.2596967205 5.105149e-02
## [2049,] 0.377630828 0.0906313987 7.250512e-03
## [2050,] 0.433331375 0.1637029640 2.061445e-02
## [2051,] 0.169380014 0.0116813803 2.685375e-04
## [2052,] 0.442218287 0.1953987782 2.877966e-02
## [2053,] 0.179450170 0.4386559699 3.574234e-01
## [2054,] 0.397531973 0.3493462791 1.023338e-01
## [2055,] 0.349346279 0.3975319727 1.507880e-01
## [2056,] 0.397531973 0.3493462791 1.023338e-01
## [2057,] 0.340371253 0.0654560102 4.195898e-03
## [2058,] 0.436239133 0.2755194522 5.800410e-02
## [2059,] 0.406028666 0.1184250277 1.151354e-02
## [2060,] 0.426168977 0.1482326877 1.718640e-02
## [2061,] 0.444358195 0.2275981001 3.885821e-02
## [2062,] 0.424154946 0.3063341278 7.374710e-02
## [2063,] 0.444093854 0.2114732637 3.356718e-02
## [2064,] 0.386693968 0.3625255950 1.132892e-01
## [2065,] 0.443086838 0.2436977611 4.467792e-02
## [2066,] 0.318229499 0.0540389715 3.058810e-03
## [2067,] 0.436239133 0.2755194522 5.800410e-02
## [2068,] 0.377630828 0.0906313987 7.250512e-03
## [2069,] 0.360146521 0.0776786613 5.584740e-03
## [2070,] 0.386693968 0.3625255950 1.132892e-01
## [2071,] 0.275519452 0.4362391326 2.302373e-01
## [2072,] 0.424154946 0.3063341278 7.374710e-02
## [2073,] 0.266544426 0.0339238361 1.439193e-03
## [2074,] 0.349346279 0.3975319727 1.507880e-01
## [2075,] 0.362525595 0.3866939680 1.374912e-01
## [2076,] 0.426168977 0.1482326877 1.718640e-02
## [2077,] 0.377630828 0.0906313987 7.250512e-03
## [2078,] 0.426168977 0.1482326877 1.718640e-02
## [2079,] 0.436239133 0.2755194522 5.800410e-02
## [2080,] 0.362525595 0.3866939680 1.374912e-01
## [2081,] 0.360146521 0.0776786613 5.584740e-03
## [2082,] 0.169380014 0.0116813803 2.685375e-04
## [2083,] 0.306334128 0.4241549461 1.957638e-01
## [2084,] 0.407438488 0.3355375785 9.210835e-02
## [2085,] 0.433331375 0.1637029640 2.061445e-02
## [2086,] 0.321175019 0.4163379880 1.798991e-01
## [2087,] 0.195398778 0.4422182874 3.336033e-01
## [2088,] 0.443086838 0.2436977611 4.467792e-02
## [2089,] 0.335537578 0.4074384881 1.649156e-01
## [2090,] 0.443086838 0.2436977611 4.467792e-02
## [2091,] 0.275519452 0.4362391326 2.302373e-01
## [2092,] 0.444358195 0.2275981001 3.885821e-02
## [2093,] 0.243697761 0.4430868383 2.685375e-01
## [2094,] 0.349346279 0.3975319727 1.507880e-01
## [2095,] 0.406028666 0.1184250277 1.151354e-02
## [2096,] 0.362525595 0.3866939680 1.374912e-01
## [2097,] 0.293645732 0.0435030714 2.148300e-03
## [2098,] 0.433331375 0.1637029640 2.061445e-02
## [2099,] 0.392899701 0.1042386963 9.218388e-03
## [2100,] 0.318229499 0.0540389715 3.058810e-03
## [2101,] 0.318229499 0.0540389715 3.058810e-03
## [2102,] 0.291090430 0.4308138364 2.125348e-01
## attr(,"degree")
## [1] 3
## attr(,"knots")
## numeric(0)
## attr(,"Boundary.knots")
## [1] 18 80
## attr(,"intercept")
## [1] FALSE
## attr(,"class")
## [1] "bs" "basis" "matrix"
library(caret); library(kernlab); data(spam)
inTrain <- createDataPartition(y=spam$type, p=0.75, list=F)
training <- spam[inTrain,]
testing <- spam[-inTrain,]
M <- abs(cor(training[,-58]))
diag(M) <-0
M
## make address all num3d our
## make 0.0000000000 0.010251209 0.061828339 0.0176950435 0.026331266
## address 0.0102512093 0.000000000 0.026773769 0.0068507758 0.016683052
## all 0.0618283393 0.026773769 0.000000000 0.0216824581 0.082098161
## num3d 0.0176950435 0.006850776 0.021682458 0.0000000000 0.004275045
## our 0.0263312660 0.016683052 0.082098161 0.0042750451 0.000000000
## over 0.0372724071 0.021004675 0.081774682 0.0101244830 0.047801736
## remove 0.0167515881 0.010897507 0.047687620 0.0224152935 0.143221602
## internet 0.0012151199 0.013973289 0.013450117 0.0103416281 0.034186181
## order 0.1134943267 0.001893951 0.090608549 0.0025842899 0.026563508
## mail 0.0345960678 0.040572652 0.019527914 0.0043898502 0.031458951
## receive 0.2086283343 0.003964620 0.048556647 0.0135189708 0.064343788
## will 0.1128220262 0.034898740 0.091902089 0.0186589766 0.073993294
## people 0.0682846394 0.013814191 0.035816398 0.0135387817 0.031968182
## report 0.0291515572 0.008384978 0.014349575 0.0148758373 0.020535265
## addresses 0.0244689899 0.005815296 0.130002639 0.0038876801 0.054531422
## free 0.0719434544 0.002773061 0.073851816 0.0013213185 0.078914775
## business 0.0926655219 0.012649729 0.039065009 0.0024621089 0.144718758
## email 0.0691401865 0.049155014 0.146911592 0.0229235213 0.056172228
## you 0.1155782605 0.052171562 0.126406713 0.0088493526 0.088369040
## credit 0.0333914604 0.014363981 0.053095905 0.0070320417 0.046283114
## your 0.1944882533 0.012591114 0.160496234 0.0113791925 0.139237460
## font 0.0250271596 0.007844967 0.037404564 0.0009053145 0.018877318
## num000 0.1477516176 0.022255004 0.131918124 0.0164370028 0.062257017
## money 0.1869624939 0.006545348 0.035877702 0.0360847491 0.002263030
## hp 0.0732837744 0.043205780 0.084047071 0.0155673639 0.070693056
## hpl 0.0657465404 0.038633414 0.058070039 0.0144755961 0.081387223
## george 0.0655791297 0.031841272 0.115118723 0.0111092111 0.090027679
## num650 0.0477349526 0.032807445 0.040002056 0.0110735373 0.064173502
## lab 0.0408811334 0.025851461 0.066682226 0.0081352263 0.039708810
## labs 0.0514955129 0.031657897 0.022922103 0.0107740192 0.050303828
## telnet 0.0418107334 0.025002650 0.028766814 0.0083742959 0.045041736
## num857 0.0333985953 0.012226956 0.061666464 0.0068682042 0.027812144
## data 0.0443333061 0.024976431 0.049210893 0.0089284257 0.045519318
## num415 0.0285884545 0.013442988 0.061875139 0.0069219127 0.027898639
## num85 0.0448420074 0.027043742 0.038328829 0.0058115439 0.049436261
## technology 0.0568828347 0.032238583 0.040633102 0.0067340265 0.059609413
## num1999 0.0527441834 0.028983211 0.067123679 0.0076574712 0.078170335
## parts 0.0066053559 0.008109559 0.004599206 0.0026619887 0.169924005
## pm 0.0040816927 0.021130918 0.019470565 0.0048502546 0.045788712
## direct 0.0339537101 0.018761386 0.051719521 0.0075776811 0.023081675
## cs 0.0192015997 0.014198192 0.033373935 0.0059309835 0.047818130
## meeting 0.0226410902 0.024563885 0.018844958 0.0084330703 0.108080213
## original 0.0212617938 0.012887794 0.046105743 0.0098702908 0.051327754
## project 0.0217837931 0.020186493 0.057490772 0.0063320855 0.013236186
## re 0.0322620540 0.012923461 0.049698541 0.0137213711 0.054742287
## edu 0.0465927300 0.021966367 0.057612428 0.0095447133 0.078028093
## table 0.0001682853 0.009709964 0.031790643 0.0035649647 0.028358916
## conference 0.0169282690 0.014601513 0.025684828 0.0010680297 0.028644973
## charSemicolon 0.0234496260 0.004667391 0.031405918 0.0033434846 0.032311366
## charRoundbracket 0.0270968221 0.044332185 0.021928697 0.0109288521 0.043127432
## charSquarebracket 0.0320951111 0.019144013 0.025380783 0.0069620421 0.025129534
## charExclamation 0.0537194124 0.010047941 0.097721623 0.0022715451 0.022652501
## charDollar 0.0904936815 0.004906670 0.083173895 0.0164271265 0.051387610
## charHash 0.0069572529 0.005652416 0.014205308 0.0024604911 0.008578909
## capitalAve 0.0435220815 0.003856182 0.087368825 0.0028276695 0.048970338
## capitalLong 0.0549154680 0.002322905 0.093170063 0.0165835615 0.043378064
## capitalTotal 0.0912654141 0.017607231 0.069090290 0.0184738663 0.001871741
## over remove internet order mail
## make 0.037272407 0.016751588 0.001215120 0.113494327 0.0345960678
## address 0.021004675 0.010897507 0.013973289 0.001893951 0.0405726524
## all 0.081774682 0.047687620 0.013450117 0.090608549 0.0195279137
## num3d 0.010124483 0.022415293 0.010341628 0.002584290 0.0043898502
## our 0.047801736 0.143221602 0.034186181 0.026563508 0.0314589507
## over 0.000000000 0.064394628 0.073772444 0.088073552 0.0096944487
## remove 0.064394628 0.000000000 0.044958066 0.060819064 0.0613709637
## internet 0.073772444 0.044958066 0.000000000 0.091520408 0.0819196124
## order 0.088073552 0.060819064 0.091520408 0.000000000 0.1167780269
## mail 0.009694449 0.061370964 0.081919612 0.116778027 0.0000000000
## receive 0.046773177 0.163354804 0.117996060 0.151434718 0.1187577175
## will 0.004722552 0.009819230 0.006489097 0.036763232 0.0660021364
## people 0.080358029 0.015441248 0.032167856 0.028852109 0.0317479284
## report 0.014199871 0.037980825 0.013882850 0.059089211 0.0112473007
## addresses 0.151944786 0.047293521 0.080947913 0.209954584 0.1181249133
## free 0.023026208 0.124402812 0.042530955 0.009363346 0.0227979372
## business 0.055256675 0.206929603 0.214506147 0.177347435 0.0891734071
## email 0.063459742 0.124857634 0.034767470 0.082268001 0.0287722530
## you 0.088101745 0.111935144 0.019079749 0.036852307 0.0844531544
## credit 0.073444945 0.064438080 0.139832829 0.163279777 0.0431160502
## your 0.105128000 0.136206660 0.158319171 0.152561170 0.0861879395
## font 0.001126507 0.001587305 0.015340427 0.016601930 0.0112261746
## num000 0.206701334 0.072286187 0.104220071 0.114860053 0.0686908583
## money 0.042958755 0.017758497 0.027994087 0.076478125 0.0469132857
## hp 0.082075416 0.089854049 0.052081649 0.065405857 0.0332712850
## hpl 0.087450205 0.081188429 0.044337430 0.047529626 0.0118708890
## george 0.067725585 0.067397200 0.058223680 0.062850198 0.0665629012
## num650 0.064875358 0.067513954 0.050349587 0.053818498 0.0199677906
## lab 0.048369147 0.049857592 0.037648173 0.044081310 0.0250833280
## labs 0.042535338 0.058755576 0.040434228 0.048623668 0.0173158453
## telnet 0.047563275 0.050564449 0.037973636 0.042184713 0.0226039245
## num857 0.035746110 0.040465509 0.034152681 0.031636782 0.0113226053
## data 0.036623164 0.042672854 0.040659495 0.019547455 0.0320050218
## num415 0.036216999 0.040860435 0.034713732 0.031328927 0.0103468095
## num85 0.051543217 0.052444862 0.033050993 0.040981497 0.0155220503
## technology 0.054679122 0.054688722 0.031817937 0.054886735 0.0201344669
## num1999 0.055360648 0.049418001 0.020826928 0.040251267 0.0042326049
## parts 0.015639505 0.014847481 0.011728024 0.006728179 0.0153984315
## pm 0.049406769 0.054360324 0.031304981 0.044614716 0.0153102187
## direct 0.028423658 0.030267384 0.003989796 0.004748995 0.0106407435
## cs 0.027263245 0.033662739 0.014061203 0.034877356 0.0295857132
## meeting 0.054348705 0.050856716 0.044766092 0.049348779 0.0540521268
## original 0.033481229 0.050071354 0.002455485 0.037385498 0.0237757219
## project 0.029571779 0.035609208 0.032214282 0.035538266 0.0288730877
## re 0.048493576 0.047735080 0.011810641 0.073419342 0.0244167127
## edu 0.029075222 0.057273985 0.042573518 0.056312806 0.0353694095
## table 0.014093876 0.018809532 0.011056631 0.009832825 0.0179683169
## conference 0.031098480 0.031688361 0.021651186 0.021941597 0.0125154224
## charSemicolon 0.024330392 0.034981046 0.029564174 0.016484387 0.0143464242
## charRoundbracket 0.002669307 0.046764497 0.028347606 0.031089928 0.0023222875
## charSquarebracket 0.025252787 0.026663804 0.017402882 0.005044004 0.0002322363
## charExclamation 0.050127304 0.052732146 0.032029857 0.036990272 0.0255748428
## charDollar 0.116330947 0.077013442 0.068971303 0.160183404 0.0642988962
## charHash 0.000734591 0.049583800 0.008571457 0.000100667 0.0470032475
## capitalAve 0.012650831 0.042162134 0.007765600 0.109668326 0.0614440165
## capitalLong 0.066904166 0.058170200 0.031876797 0.166952879 0.0825353125
## capitalTotal 0.071008242 0.003060082 0.045135091 0.263410332 0.0889325803
## receive will people report addresses
## make 0.208628334 0.112822026 0.068284639 0.0291515572 0.0244689899
## address 0.003964620 0.034898740 0.013814191 0.0083849777 0.0058152964
## all 0.048556647 0.091902089 0.035816398 0.0143495748 0.1300026393
## num3d 0.013518971 0.018658977 0.013538782 0.0148758373 0.0038876801
## our 0.064343788 0.073993294 0.031968182 0.0205352655 0.0545314220
## over 0.046773177 0.004722552 0.080358029 0.0141998706 0.1519447859
## remove 0.163354804 0.009819230 0.015441248 0.0379808249 0.0472935208
## internet 0.117996060 0.006489097 0.032167856 0.0138828504 0.0809479131
## order 0.151434718 0.036763232 0.028852109 0.0590892108 0.2099545845
## mail 0.118757717 0.066002136 0.031747928 0.0112473007 0.1181249133
## receive 0.000000000 0.129636358 0.053219651 0.0464950523 0.0531868897
## will 0.129636358 0.000000000 0.001420001 0.0025401745 0.0239228735
## people 0.053219651 0.001420001 0.000000000 0.0615657591 0.0817192610
## report 0.046495052 0.002540175 0.061565759 0.0000000000 0.0164038293
## addresses 0.053186890 0.023922874 0.081719261 0.0164038293 0.0000000000
## free 0.093636155 0.028007217 0.013514384 0.0010681457 0.0023805507
## business 0.191888288 0.055482171 0.056782182 0.0101168020 0.0302974900
## email 0.085967381 0.014085324 0.079987784 0.0362571322 0.2372871534
## you 0.141840248 0.092387108 0.118101556 0.0010949721 0.0505959402
## credit 0.180013164 0.020901042 0.014665439 0.0376544275 0.0212104542
## your 0.312171964 0.111752533 0.049889845 0.0240675883 0.0764059360
## font 0.009577142 0.046003846 0.030262341 0.0194650964 0.0002891061
## num000 0.088745311 0.020950843 0.129080292 0.0422022974 0.3182741315
## money 0.053061606 0.015093419 0.074035990 0.0244209007 0.0247752152
## hp 0.076139225 0.036101365 0.062056596 0.0319574904 0.0487448113
## hpl 0.074958460 0.011770562 0.073689583 0.0395249603 0.0287859302
## george 0.064939321 0.120844884 0.051724123 0.0284052318 0.0424128188
## num650 0.059452852 0.040544374 0.059673484 0.0171771205 0.0368262573
## lab 0.046759674 0.087845895 0.039226651 0.0078960121 0.0293510482
## labs 0.051554547 0.009330391 0.051358282 0.0251590749 0.0342526578
## telnet 0.040881908 0.028944345 0.040771148 0.0167855876 0.0283476607
## num857 0.037159896 0.051594095 0.031114073 0.0164443105 0.0224575272
## data 0.044537033 0.023426848 0.048699549 0.0191681429 0.0141591128
## num415 0.036648119 0.052430754 0.031062674 0.0166239733 0.0228858667
## num85 0.046182680 0.043401976 0.047721516 0.0220618948 0.0244580315
## technology 0.050903960 0.010979056 0.047398260 0.0010306766 0.0345278983
## num1999 0.036624325 0.045194093 0.035156028 0.0297705005 0.0420234736
## parts 0.008194087 0.022279363 0.012822224 0.0032763603 0.0116277689
## pm 0.050236472 0.018061298 0.022945338 0.0268364638 0.0127013497
## direct 0.022238307 0.035498256 0.009762093 0.0215613311 0.0533315436
## cs 0.034314353 0.035217500 0.017686443 0.0208261136 0.0118153462
## meeting 0.046075282 0.089723522 0.041943574 0.0024653224 0.0333174229
## original 0.037921655 0.029392153 0.008432761 0.0013915805 0.0379183342
## project 0.037104643 0.009005748 0.026224512 0.0120694916 0.0181473598
## re 0.060638900 0.077606950 0.048017732 0.0053992897 0.0364192112
## edu 0.051316908 0.070626129 0.020148695 0.0200793185 0.0254153346
## table 0.020094033 0.005269911 0.013259450 0.0517511215 0.0118961147
## conference 0.021181507 0.027479587 0.019572056 0.0150413172 0.0216183606
## charSemicolon 0.034470380 0.030414906 0.026641783 0.0194226684 0.0171486112
## charRoundbracket 0.057802577 0.034819391 0.044720646 0.0017080361 0.0062274193
## charSquarebracket 0.029728145 0.044557371 0.027338471 0.0119549956 0.0098634679
## charExclamation 0.024833733 0.007914177 0.043138964 0.0106750408 0.0097207012
## charDollar 0.074915892 0.019137779 0.188727334 0.0843707853 0.1206633337
## charHash 0.005154212 0.029376004 0.014696770 0.0056242600 0.0036064878
## capitalAve 0.027516687 0.013508605 0.013587433 0.0008744141 0.0095910319
## capitalLong 0.078404329 0.012819329 0.038957119 0.0453058252 0.1819834471
## capitalTotal 0.118877151 0.019688974 0.115553071 0.1702989353 0.1631348647
## free business email you credit
## make 0.071943454 0.092665522 0.069140187 0.1155782605 0.033391460
## address 0.002773061 0.012649729 0.049155014 0.0521715625 0.014363981
## all 0.073851816 0.039065009 0.146911592 0.1264067132 0.053095905
## num3d 0.001321319 0.002462109 0.022923521 0.0088493526 0.007032042
## our 0.078914775 0.144718758 0.056172228 0.0883690398 0.046283114
## over 0.023026208 0.055256675 0.063459742 0.0881017451 0.073444945
## remove 0.124402812 0.206929603 0.124857634 0.1119351444 0.064438080
## internet 0.042530955 0.214506147 0.034767470 0.0190797492 0.139832829
## order 0.009363346 0.177347435 0.082268001 0.0368523070 0.163279777
## mail 0.022797937 0.089173407 0.028772253 0.0844531544 0.043116050
## receive 0.093636155 0.191888288 0.085967381 0.1418402484 0.180013164
## will 0.028007217 0.055482171 0.014085324 0.0923871079 0.020901042
## people 0.013514384 0.056782182 0.079987784 0.1181015556 0.014665439
## report 0.001068146 0.010116802 0.036257132 0.0010949721 0.037654428
## addresses 0.002380551 0.030297490 0.237287153 0.0505959402 0.021210454
## free 0.000000000 0.054539458 0.081208238 0.0812718813 0.032922983
## business 0.054539458 0.000000000 0.041601178 0.0886897639 0.227126479
## email 0.081208238 0.041601178 0.000000000 0.1009530904 0.016249200
## you 0.081271881 0.088689764 0.100953090 0.0000000000 0.054217806
## credit 0.032922983 0.227126479 0.016249200 0.0542178058 0.000000000
## your 0.096338953 0.217135107 0.134580032 0.3014571987 0.168526766
## font 0.008707616 0.019517714 0.025535193 0.0289412131 0.039684728
## num000 0.056532443 0.119800991 0.088915784 0.1146470747 0.056755794
## money 0.100173732 0.029886620 0.095020091 0.1908377416 0.063797918
## hp 0.088963160 0.052702509 0.044955435 0.1960142562 0.053481746
## hpl 0.078948716 0.078008151 0.027994126 0.1643506806 0.057435920
## george 0.017823007 0.068254782 0.070985272 0.1511038176 0.043723123
## num650 0.062258659 0.062085383 0.029506897 0.1150326541 0.043822641
## lab 0.046787628 0.046509080 0.052012392 0.0865283297 0.032832083
## labs 0.058403360 0.044590283 0.014515842 0.1137422902 0.042970658
## telnet 0.047379357 0.045331134 0.033811708 0.0967948604 0.033194231
## num857 0.039947928 0.041157248 0.041984220 0.0776295277 0.026848323
## data 0.043824348 0.039712487 0.048333428 0.1047163932 0.033176207
## num415 0.039770286 0.041218508 0.043301996 0.0777532347 0.027831235
## num85 0.053818954 0.052441298 0.008290727 0.0888403936 0.034976818
## technology 0.059722867 0.034530411 0.015384285 0.1322212462 0.043115904
## num1999 0.062992881 0.046301858 0.048193156 0.1246375605 0.046785730
## parts 0.014407937 0.014484541 0.012958314 0.0279322305 0.025677517
## pm 0.045511554 0.044722852 0.022694073 0.0394986529 0.036112861
## direct 0.032566834 0.003564518 0.005289105 0.0591020241 0.001162255
## cs 0.031790308 0.035391795 0.031391742 0.0600787151 0.023920476
## meeting 0.034294724 0.040000985 0.052125835 0.0895906246 0.033840677
## original 0.045552881 0.050457931 0.016862922 0.0491230666 0.033013341
## project 0.031455697 0.024360853 0.033732521 0.0647033282 0.014925420
## re 0.042217844 0.057029883 0.050587250 0.1342495085 0.050045384
## edu 0.048828920 0.056466401 0.039580156 0.0193717564 0.035650299
## table 0.018980459 0.007527992 0.026422653 0.0043056113 0.009270122
## conference 0.026127200 0.027774124 0.030395085 0.0570889525 0.021499438
## charSemicolon 0.028028954 0.036755121 0.040884295 0.0490592788 0.024959294
## charRoundbracket 0.041281177 0.030050331 0.035648846 0.1200763595 0.022689596
## charSquarebracket 0.028431189 0.033512035 0.022232301 0.0612986732 0.011685189
## charExclamation 0.101384013 0.069930532 0.042878940 0.1551444733 0.057577450
## charDollar 0.030032971 0.106528945 0.077914958 0.0935789113 0.053215397
## charHash 0.037138038 0.003104082 0.030605964 0.0034968813 0.012477741
## capitalAve 0.016932172 0.038999057 0.009477003 0.0319921946 0.075779888
## capitalLong 0.025267210 0.059610923 0.060054963 0.0007916675 0.112274228
## capitalTotal 0.001296509 0.075893961 0.043006876 0.0084561133 0.108440280
## your font num000 money
## make 0.194488253 2.502716e-02 0.147751618 0.1869624939
## address 0.012591114 7.844967e-03 0.022255004 0.0065453482
## all 0.160496234 3.740456e-02 0.131918124 0.0358777025
## num3d 0.011379193 9.053145e-04 0.016437003 0.0360847491
## our 0.139237460 1.887732e-02 0.062257017 0.0022630302
## over 0.105128000 1.126507e-03 0.206701334 0.0429587548
## remove 0.136206660 1.587305e-03 0.072286187 0.0177584967
## internet 0.158319171 1.534043e-02 0.104220071 0.0279940870
## order 0.152561170 1.660193e-02 0.114860053 0.0764781251
## mail 0.086187940 1.122617e-02 0.068690858 0.0469132857
## receive 0.312171964 9.577142e-03 0.088745311 0.0530616060
## will 0.111752533 4.600385e-02 0.020950843 0.0150934192
## people 0.049889845 3.026234e-02 0.129080292 0.0740359899
## report 0.024067588 1.946510e-02 0.042202297 0.0244209007
## addresses 0.076405936 2.891061e-04 0.318274131 0.0247752152
## free 0.096338953 8.707616e-03 0.056532443 0.1001737321
## business 0.217135107 1.951771e-02 0.119800991 0.0298866204
## email 0.134580032 2.553519e-02 0.088915784 0.0950200907
## you 0.301457199 2.894121e-02 0.114647075 0.1908377416
## credit 0.168526766 3.968473e-02 0.056755794 0.0637979178
## your 0.000000000 2.282683e-02 0.125467117 0.1550432120
## font 0.022826831 0.000000e+00 0.037658362 0.0102004261
## num000 0.125467117 3.765836e-02 0.000000000 0.0482613317
## money 0.155043212 1.020043e-02 0.048261332 0.0000000000
## hp 0.153217539 4.004337e-02 0.089148295 0.0642833175
## hpl 0.135575961 3.693815e-02 0.084385525 0.0603794824
## george 0.126719392 2.855565e-02 0.069458380 0.0461961429
## num650 0.096665789 2.866109e-02 0.069385904 0.0460912910
## lab 0.063871917 2.096628e-02 0.048893764 0.0347390773
## labs 0.089840313 2.795324e-02 0.064115382 0.0452744552
## telnet 0.072128125 2.151698e-02 0.051945166 0.0345520739
## num857 0.044352938 1.764722e-02 0.043037297 0.0284226853
## data 0.092220991 2.120913e-02 0.051936593 0.0359594025
## num415 0.045080348 1.789298e-02 0.043250174 0.0291410322
## num85 0.082170020 2.360646e-02 0.052658259 0.0364921342
## technology 0.107153430 2.819024e-02 0.065586677 0.0456273399
## num1999 0.115663508 3.494836e-02 0.071380314 0.0542458905
## parts 0.018352112 4.000192e-03 0.017330348 0.0055066200
## pm 0.070949591 2.337354e-02 0.039592380 0.0367560668
## direct 0.015045202 2.213905e-02 0.001973227 0.0251389647
## cs 0.060640198 1.523912e-02 0.036919559 0.0252129303
## meeting 0.089493901 2.166306e-02 0.052567099 0.0351486340
## original 0.048422841 2.240113e-02 0.046161090 0.0384593639
## project 0.060022849 1.249552e-02 0.036806994 0.0233003128
## re 0.038424376 3.333617e-02 0.056411042 0.0470765497
## edu 0.079663957 2.167025e-02 0.057198295 0.0303988081
## table 0.018138044 9.159848e-03 0.018611018 0.0114761353
## conference 0.048153207 1.394118e-02 0.030788001 0.0173104351
## charSemicolon 0.059984600 3.993788e-01 0.028201810 0.0173270199
## charRoundbracket 0.076237209 4.369711e-02 0.035515731 0.0290302370
## charSquarebracket 0.054176291 4.303239e-05 0.029123435 0.0210151706
## charExclamation 0.071457165 4.815566e-03 0.067371022 0.0462515983
## charDollar 0.158340476 7.545806e-03 0.330162221 0.0891438498
## charHash 0.004700013 1.998387e-01 0.013174929 0.0001303144
## capitalAve 0.032371759 2.054459e-02 0.006282975 0.0066877024
## capitalLong 0.064074564 3.016705e-02 0.114980943 0.0333474118
## capitalTotal 0.049735204 1.343887e-01 0.186256490 0.0738845041
## hp hpl george num650 lab
## make 0.0732837744 0.065746540 0.0655791297 0.047734953 0.040881133
## address 0.0432057796 0.038633414 0.0318412715 0.032807445 0.025851461
## all 0.0840470709 0.058070039 0.1151187232 0.040002056 0.066682226
## num3d 0.0155673639 0.014475596 0.0111092111 0.011073537 0.008135226
## our 0.0706930565 0.081387223 0.0900276791 0.064173502 0.039708810
## over 0.0820754165 0.087450205 0.0677255850 0.064875358 0.048369147
## remove 0.0898540495 0.081188429 0.0673971998 0.067513954 0.049857592
## internet 0.0520816486 0.044337430 0.0582236797 0.050349587 0.037648173
## order 0.0654058571 0.047529626 0.0628501978 0.053818498 0.044081310
## mail 0.0332712850 0.011870889 0.0665629012 0.019967791 0.025083328
## receive 0.0761392255 0.074958460 0.0649393207 0.059452852 0.046759674
## will 0.0361013653 0.011770562 0.1208448844 0.040544374 0.087845895
## people 0.0620565959 0.073689583 0.0517241234 0.059673484 0.039226651
## report 0.0319574904 0.039524960 0.0284052318 0.017177121 0.007896012
## addresses 0.0487448113 0.028785930 0.0424128188 0.036826257 0.029351048
## free 0.0889631596 0.078948716 0.0178230068 0.062258659 0.046787628
## business 0.0527025089 0.078008151 0.0682547822 0.062085383 0.046509080
## email 0.0449554352 0.027994126 0.0709852718 0.029506897 0.052012392
## you 0.1960142562 0.164350681 0.1511038176 0.115032654 0.086528330
## credit 0.0534817463 0.057435920 0.0437231233 0.043822641 0.032832083
## your 0.1532175392 0.135575961 0.1267193924 0.096665789 0.063871917
## font 0.0400433670 0.036938154 0.0285556461 0.028661093 0.020966279
## num000 0.0891482946 0.084385525 0.0694583797 0.069385904 0.048893764
## money 0.0642833175 0.060379482 0.0461961429 0.046091291 0.034739077
## hp 0.0000000000 0.538998750 0.0077490625 0.332284739 0.191388498
## hpl 0.5389987501 0.000000000 0.0025146743 0.397323763 0.205866487
## george 0.0077490625 0.002514674 0.0000000000 0.037288018 0.029599567
## num650 0.3322847395 0.397323763 0.0372880182 0.000000000 0.351559246
## lab 0.1913884984 0.205866487 0.0295995670 0.351559246 0.000000000
## labs 0.4309240379 0.402719193 0.0481055122 0.612920904 0.380208098
## telnet 0.3741331777 0.388756795 0.0603270857 0.602261710 0.435124072
## num857 0.3582410628 0.374376711 0.0824218520 0.584175561 0.489207043
## data 0.0095937503 0.001841254 0.0229736101 0.020134009 0.001877568
## num415 0.3567309208 0.373270913 0.0816868077 0.582070224 0.487163907
## num85 0.2855628002 0.326746219 0.0331642279 0.568367428 0.305995466
## technology 0.3785356473 0.355187043 0.0391577118 0.572498951 0.391055830
## num1999 0.1239079707 0.179212795 0.0161213237 0.024354731 0.007269186
## parts 0.0201102621 0.046368807 0.0116820397 0.012254382 0.005330146
## pm 0.0687685115 0.078354862 0.0005318936 0.061761110 0.012195157
## direct 0.3224992138 0.335954047 0.0626456444 0.541601990 0.454287540
## cs 0.0055684926 0.020885795 0.0165949403 0.031910257 0.015851131
## meeting 0.0096678348 0.057950153 0.0009518897 0.006167762 0.424315315
## original 0.0952705312 0.124361546 0.0118348640 0.081544803 0.045520385
## project 0.0003021006 0.018155852 0.0136922371 0.004159053 0.002266160
## re 0.0578359069 0.003020758 0.0011082692 0.005835609 0.010421612
## edu 0.0452423719 0.037513177 0.0388828497 0.003024687 0.023140738
## table 0.0034161120 0.019412743 0.0096917006 0.007988997 0.001704075
## conference 0.0078789089 0.003015458 0.0113507246 0.010201337 0.001558340
## charSemicolon 0.0363940603 0.019216374 0.0256395518 0.023614441 0.019178061
## charRoundbracket 0.1365025373 0.150143639 0.0292647549 0.289765958 0.146921423
## charSquarebracket 0.0341615218 0.066973651 0.0164289374 0.035347544 0.002796885
## charExclamation 0.0857732454 0.081665090 0.0639839943 0.059859369 0.040759731
## charDollar 0.0903580199 0.087225900 0.0729119124 0.061774374 0.053702088
## charHash 0.0495873747 0.021915830 0.0216742580 0.011562897 0.004719951
## capitalAve 0.0175432622 0.023928300 0.0249796876 0.012626378 0.015173581
## capitalLong 0.0466030161 0.047583151 0.0505768235 0.034622372 0.032824071
## capitalTotal 0.0415675008 0.059879645 0.1033581926 0.070187447 0.061390160
## labs telnet num857 data
## make 0.0514955129 0.0418107334 0.033398595 0.0443333061
## address 0.0316578967 0.0250026497 0.012226956 0.0249764314
## all 0.0229221034 0.0287668137 0.061666464 0.0492108933
## num3d 0.0107740192 0.0083742959 0.006868204 0.0089284257
## our 0.0503038283 0.0450417364 0.027812144 0.0455193181
## over 0.0425353378 0.0475632746 0.035746110 0.0366231636
## remove 0.0587555764 0.0505644487 0.040465509 0.0426728542
## internet 0.0404342284 0.0379736363 0.034152681 0.0406594948
## order 0.0486236680 0.0421847135 0.031636782 0.0195474550
## mail 0.0173158453 0.0226039245 0.011322605 0.0320050218
## receive 0.0515545467 0.0408819075 0.037159896 0.0445370331
## will 0.0093303905 0.0289443449 0.051594095 0.0234268483
## people 0.0513582815 0.0407711483 0.031114073 0.0486995494
## report 0.0251590749 0.0167855876 0.016444310 0.0191681429
## addresses 0.0342526578 0.0283476607 0.022457527 0.0141591128
## free 0.0584033600 0.0473793568 0.039947928 0.0438243478
## business 0.0445902832 0.0453311337 0.041157248 0.0397124871
## email 0.0145158416 0.0338117081 0.041984220 0.0483334284
## you 0.1137422902 0.0967948604 0.077629528 0.1047163932
## credit 0.0429706584 0.0331942307 0.026848323 0.0331762069
## your 0.0898403129 0.0721281245 0.044352938 0.0922209908
## font 0.0279532394 0.0215169814 0.017647218 0.0212091289
## num000 0.0641153823 0.0519451665 0.043037297 0.0519365929
## money 0.0452744552 0.0345520739 0.028422685 0.0359594025
## hp 0.4309240379 0.3741331777 0.358241063 0.0095937503
## hpl 0.4027191933 0.3887567954 0.374376711 0.0018412535
## george 0.0481055122 0.0603270857 0.082421852 0.0229736101
## num650 0.6129209045 0.6022617104 0.584175561 0.0201340086
## lab 0.3802080976 0.4351240722 0.489207043 0.0018775677
## labs 0.0000000000 0.7003551741 0.685577722 0.0263549943
## telnet 0.7003551741 0.0000000000 0.821359071 0.0147328848
## num857 0.6855777224 0.8213590712 0.000000000 0.0207080668
## data 0.0263549943 0.0147328848 0.020708067 0.0000000000
## num415 0.6827440464 0.8182559390 0.995243691 0.0212362281
## num85 0.5411178800 0.5584091539 0.535508170 0.0198984011
## technology 0.6503199519 0.7485831090 0.725140647 0.0130505820
## num1999 0.0521070128 0.0441096346 0.035230686 0.0679300740
## parts 0.0029586865 0.0086575068 0.006962267 0.0403265890
## pm 0.0470363863 0.0650041530 0.060056550 0.1118743844
## direct 0.6335297031 0.7802060335 0.858955399 0.0224395541
## cs 0.0505548142 0.0127663631 0.008962767 0.0011675726
## meeting 0.0257586725 0.0209538822 0.015356275 0.0099167637
## original 0.0682220281 0.0889208937 0.114066622 0.0108741134
## project 0.0011073061 0.1108446139 0.007764925 0.0365613627
## re 0.0134558067 0.0066917646 0.018985929 0.0003559938
## edu 0.0083317752 0.0252021114 0.017992532 0.0175905063
## table 0.0033736461 0.0009797627 0.002517480 0.0031672709
## conference 0.0003846002 0.0133367042 0.009989861 0.0069608619
## charSemicolon 0.0224497251 0.0169146542 0.009312327 0.0064081734
## charRoundbracket 0.2277163615 0.2558814424 0.298967625 0.0188809980
## charSquarebracket 0.0020717531 0.0046514682 0.012231067 0.0281770522
## charExclamation 0.0600628012 0.0458864132 0.039062809 0.0501867455
## charDollar 0.0680304013 0.0540539228 0.045826239 0.0523705980
## charHash 0.0745855364 0.0041019426 0.011551143 0.0084545929
## capitalAve 0.0155502474 0.0125336284 0.010592141 0.0162172097
## capitalLong 0.0343417473 0.0280973452 0.025362449 0.0254745700
## capitalTotal 0.0645956522 0.0518984681 0.049347676 0.0188148121
## num415 num85 technology num1999 parts
## make 0.0285884545 0.044842007 0.056882835 0.052744183 6.605356e-03
## address 0.0134429884 0.027043742 0.032238583 0.028983211 8.109559e-03
## all 0.0618751395 0.038328829 0.040633102 0.067123679 4.599206e-03
## num3d 0.0069219127 0.005811544 0.006734026 0.007657471 2.661989e-03
## our 0.0278986390 0.049436261 0.059609413 0.078170335 1.699240e-01
## over 0.0362169991 0.051543217 0.054679122 0.055360648 1.563951e-02
## remove 0.0408604348 0.052444862 0.054688722 0.049418001 1.484748e-02
## internet 0.0347137317 0.033050993 0.031817937 0.020826928 1.172802e-02
## order 0.0313289271 0.040981497 0.054886735 0.040251267 6.728179e-03
## mail 0.0103468095 0.015522050 0.020134467 0.004232605 1.539843e-02
## receive 0.0366481191 0.046182680 0.050903960 0.036624325 8.194087e-03
## will 0.0524307545 0.043401976 0.010979056 0.045194093 2.227936e-02
## people 0.0310626737 0.047721516 0.047398260 0.035156028 1.282222e-02
## report 0.0166239733 0.022061895 0.001030677 0.029770500 3.276360e-03
## addresses 0.0228858667 0.024458032 0.034527898 0.042023474 1.162777e-02
## free 0.0397702863 0.053818954 0.059722867 0.062992881 1.440794e-02
## business 0.0412185077 0.052441298 0.034530411 0.046301858 1.448454e-02
## email 0.0433019960 0.008290727 0.015384285 0.048193156 1.295831e-02
## you 0.0777532347 0.088840394 0.132221246 0.124637560 2.793223e-02
## credit 0.0278312351 0.034976818 0.043115904 0.046785730 2.567752e-02
## your 0.0450803479 0.082170020 0.107153430 0.115663508 1.835211e-02
## font 0.0178929841 0.023606461 0.028190245 0.034948357 4.000192e-03
## num000 0.0432501741 0.052658259 0.065586677 0.071380314 1.733035e-02
## money 0.0291410322 0.036492134 0.045627340 0.054245891 5.506620e-03
## hp 0.3567309208 0.285562800 0.378535647 0.123907971 2.011026e-02
## hpl 0.3732709127 0.326746219 0.355187043 0.179212795 4.636881e-02
## george 0.0816868077 0.033164228 0.039157712 0.016121324 1.168204e-02
## num650 0.5820702235 0.568367428 0.572498951 0.024354731 1.225438e-02
## lab 0.4871639072 0.305995466 0.391055830 0.007269186 5.330146e-03
## labs 0.6827440464 0.541117880 0.650319952 0.052107013 2.958686e-03
## telnet 0.8182559390 0.558409154 0.748583109 0.044109635 8.657507e-03
## num857 0.9952436910 0.535508170 0.725140647 0.035230686 6.962267e-03
## data 0.0212362281 0.019898401 0.013050582 0.067930074 4.032659e-02
## num415 0.0000000000 0.533526692 0.722065301 0.036549101 7.091054e-03
## num85 0.5335266915 0.000000000 0.495539522 0.023387566 1.031296e-02
## technology 0.7220653007 0.495539522 0.000000000 0.061924965 9.198663e-03
## num1999 0.0365491008 0.023387566 0.061924965 0.000000000 4.921353e-03
## parts 0.0070910544 0.010312964 0.009198663 0.004921353 0.000000e+00
## pm 0.0593567301 0.030868106 0.083897357 0.227401319 1.108923e-02
## direct 0.8557210878 0.501730812 0.680027624 0.019550904 9.355460e-03
## cs 0.0092469858 0.029354370 0.019031031 0.103009098 5.963977e-03
## meeting 0.0157519335 0.033293906 0.030364748 0.009304534 1.635511e-01
## original 0.1131678750 0.056445431 0.074441397 0.324067574 9.939269e-03
## project 0.0073893003 0.004186908 0.010334938 0.003206279 2.597548e-03
## re 0.0184659723 0.015737941 0.010242306 0.069512560 7.209994e-05
## edu 0.0183766771 0.010524491 0.034135828 0.134073003 8.883419e-03
## table 0.0023210350 0.020267961 0.001579537 0.019051380 3.971741e-03
## conference 0.0103881876 0.008109436 0.022533019 0.063365119 3.317312e-04
## charSemicolon 0.0097943769 0.020629535 0.019700900 0.044604461 1.501609e-02
## charRoundbracket 0.2976188432 0.186459752 0.237292687 0.083196174 3.154710e-03
## charSquarebracket 0.0121592957 0.033012511 0.005916613 0.062811444 6.730204e-03
## charExclamation 0.0362324154 0.045258775 0.057132828 0.054093189 1.190002e-02
## charDollar 0.0416779551 0.047697175 0.060309083 0.069756101 1.177313e-02
## charHash 0.0114320329 0.010446006 0.013483146 0.026258659 2.593916e-03
## capitalAve 0.0008320091 0.013181998 0.019483355 0.014682745 5.203977e-03
## capitalLong 0.0217847983 0.026441899 0.035789542 0.032997789 6.170952e-03
## capitalTotal 0.0473999134 0.043872780 0.050404271 0.002666160 9.468409e-03
## pm direct cs meeting
## make 0.0040816927 0.033953710 0.0192015997 0.0226410902
## address 0.0211309184 0.018761386 0.0141981918 0.0245638854
## all 0.0194705651 0.051719521 0.0333739350 0.0188449582
## num3d 0.0048502546 0.007577681 0.0059309835 0.0084330703
## our 0.0457887123 0.023081675 0.0478181299 0.1080802129
## over 0.0494067688 0.028423658 0.0272632448 0.0543487050
## remove 0.0543603240 0.030267384 0.0336627388 0.0508567161
## internet 0.0313049813 0.003989796 0.0140612026 0.0447660924
## order 0.0446147162 0.004748995 0.0348773559 0.0493487788
## mail 0.0153102187 0.010640743 0.0295857132 0.0540521268
## receive 0.0502364719 0.022238307 0.0343143534 0.0460752817
## will 0.0180612980 0.035498256 0.0352175004 0.0897235215
## people 0.0229453378 0.009762093 0.0176864432 0.0419435737
## report 0.0268364638 0.021561331 0.0208261136 0.0024653224
## addresses 0.0127013497 0.053331544 0.0118153462 0.0333174229
## free 0.0455115543 0.032566834 0.0317903075 0.0342947243
## business 0.0447228519 0.003564518 0.0353917952 0.0400009845
## email 0.0226940725 0.005289105 0.0313917423 0.0521258351
## you 0.0394986529 0.059102024 0.0600787151 0.0895906246
## credit 0.0361128610 0.001162255 0.0239204764 0.0338406767
## your 0.0709495913 0.015045202 0.0606401977 0.0894939014
## font 0.0233735382 0.022139046 0.0152391153 0.0216630626
## num000 0.0395923803 0.001973227 0.0369195586 0.0525670993
## money 0.0367560668 0.025138965 0.0252129303 0.0351486340
## hp 0.0687685115 0.322499214 0.0055684926 0.0096678348
## hpl 0.0783548625 0.335954047 0.0208857954 0.0579501529
## george 0.0005318936 0.062645644 0.0165949403 0.0009518897
## num650 0.0617611105 0.541601990 0.0319102566 0.0061677625
## lab 0.0121951568 0.454287540 0.0158511314 0.4243153154
## labs 0.0470363863 0.633529703 0.0505548142 0.0257586725
## telnet 0.0650041530 0.780206033 0.0127663631 0.0209538822
## num857 0.0600565502 0.858955399 0.0089627666 0.0153562746
## data 0.1118743844 0.022439554 0.0011675726 0.0099167637
## num415 0.0593567301 0.855721088 0.0092469858 0.0157519335
## num85 0.0308681062 0.501730812 0.0293543702 0.0332939061
## technology 0.0838973566 0.680027624 0.0190310305 0.0303647484
## num1999 0.2274013195 0.019550904 0.1030090984 0.0093045336
## parts 0.0110892296 0.009355460 0.0059639774 0.1635511427
## pm 0.0000000000 0.036086514 0.0256373931 0.0448745320
## direct 0.0360865137 0.000000000 0.0141433062 0.0238322292
## cs 0.0256373931 0.014143306 0.0000000000 0.0151483426
## meeting 0.0448745320 0.023832229 0.0151483426 0.0000000000
## original 0.2632837667 0.093435682 0.0728193544 0.0119492444
## project 0.0209893355 0.001890946 0.0099125772 0.0023167797
## re 0.0640284273 0.005897540 0.0064057172 0.0068315640
## edu 0.0004889192 0.026015269 0.3583793773 0.0183797421
## table 0.0075806680 0.002780664 0.0074230299 0.0125185138
## conference 0.0170322707 0.014002270 0.0006365934 0.0008906059
## charSemicolon 0.0228247691 0.018721284 0.0625895130 0.0075568505
## charRoundbracket 0.0671579819 0.263205815 0.0153654334 0.0204105492
## charSquarebracket 0.0476572897 0.010051389 0.0285984529 0.0129531557
## charExclamation 0.0204535162 0.029393359 0.0249844688 0.0373087564
## charDollar 0.0489761908 0.016774625 0.0392765652 0.0503858909
## charHash 0.0115498247 0.009841183 0.0124044275 0.0025993697
## capitalAve 0.0153536804 0.006670768 0.0087762912 0.0179702202
## capitalLong 0.0297621970 0.007249799 0.0223133309 0.0331226474
## capitalTotal 0.0556118764 0.029322378 0.0313670906 0.0623956662
## original project re edu
## make 0.021261794 2.178379e-02 3.226205e-02 0.0465927300
## address 0.012887794 2.018649e-02 1.292346e-02 0.0219663668
## all 0.046105743 5.749077e-02 4.969854e-02 0.0576124275
## num3d 0.009870291 6.332086e-03 1.372137e-02 0.0095447133
## our 0.051327754 1.323619e-02 5.474229e-02 0.0780280933
## over 0.033481229 2.957178e-02 4.849358e-02 0.0290752224
## remove 0.050071354 3.560921e-02 4.773508e-02 0.0572739847
## internet 0.002455485 3.221428e-02 1.181064e-02 0.0425735184
## order 0.037385498 3.553827e-02 7.341934e-02 0.0563128056
## mail 0.023775722 2.887309e-02 2.441671e-02 0.0353694095
## receive 0.037921655 3.710464e-02 6.063890e-02 0.0513169082
## will 0.029392153 9.005748e-03 7.760695e-02 0.0706261291
## people 0.008432761 2.622451e-02 4.801773e-02 0.0201486945
## report 0.001391581 1.206949e-02 5.399290e-03 0.0200793185
## addresses 0.037918334 1.814736e-02 3.641921e-02 0.0254153346
## free 0.045552881 3.145570e-02 4.221784e-02 0.0488289201
## business 0.050457931 2.436085e-02 5.702988e-02 0.0564664014
## email 0.016862922 3.373252e-02 5.058725e-02 0.0395801557
## you 0.049123067 6.470333e-02 1.342495e-01 0.0193717564
## credit 0.033013341 1.492542e-02 5.004538e-02 0.0356502987
## your 0.048422841 6.002285e-02 3.842438e-02 0.0796639568
## font 0.022401127 1.249552e-02 3.333617e-02 0.0216702510
## num000 0.046161090 3.680699e-02 5.641104e-02 0.0571982954
## money 0.038459364 2.330031e-02 4.707655e-02 0.0303988081
## hp 0.095270531 3.021006e-04 5.783591e-02 0.0452423719
## hpl 0.124361546 1.815585e-02 3.020758e-03 0.0375131772
## george 0.011834864 1.369224e-02 1.108269e-03 0.0388828497
## num650 0.081544803 4.159053e-03 5.835609e-03 0.0030246874
## lab 0.045520385 2.266160e-03 1.042161e-02 0.0231407383
## labs 0.068222028 1.107306e-03 1.345581e-02 0.0083317752
## telnet 0.088920894 1.108446e-01 6.691765e-03 0.0252021114
## num857 0.114066622 7.764925e-03 1.898593e-02 0.0179925324
## data 0.010874113 3.656136e-02 3.559938e-04 0.0175905063
## num415 0.113167875 7.389300e-03 1.846597e-02 0.0183766771
## num85 0.056445431 4.186908e-03 1.573794e-02 0.0105244906
## technology 0.074441397 1.033494e-02 1.024231e-02 0.0341358279
## num1999 0.324067574 3.206279e-03 6.951256e-02 0.1340730027
## parts 0.009939269 2.597548e-03 7.209994e-05 0.0088834190
## pm 0.263283767 2.098934e-02 6.402843e-02 0.0004889192
## direct 0.093435682 1.890946e-03 5.897540e-03 0.0260152690
## cs 0.072819354 9.912577e-03 6.405717e-03 0.3583793773
## meeting 0.011949244 2.316780e-03 6.831564e-03 0.0183797421
## original 0.000000000 1.159858e-02 9.567863e-02 0.0081399905
## project 0.011598581 0.000000e+00 1.229474e-03 0.0170024042
## re 0.095678629 1.229474e-03 0.000000e+00 0.0398351728
## edu 0.008139990 1.700240e-02 3.983517e-02 0.0000000000
## table 0.021775680 3.339051e-03 1.193851e-02 0.0105072112
## conference 0.002640286 8.596095e-06 6.017755e-03 0.0151142803
## charSemicolon 0.020560658 6.015503e-03 2.303299e-02 0.0233417219
## charRoundbracket 0.059974529 7.411853e-03 2.491348e-03 0.0180110274
## charSquarebracket 0.096829387 1.090554e-02 2.932896e-03 0.0049985253
## charExclamation 0.046515412 3.174995e-02 5.477039e-02 0.0359995713
## charDollar 0.058976631 3.924899e-02 5.335491e-02 0.0527176180
## charHash 0.015813690 4.086810e-03 2.432517e-02 0.0154239069
## capitalAve 0.018006368 1.340468e-02 2.741841e-02 0.0173113035
## capitalLong 0.019363744 2.499261e-02 4.886893e-02 0.0315777230
## capitalTotal 0.040603565 4.449521e-02 1.002697e-01 0.0503289753
## table conference charSemicolon charRoundbracket
## make 1.682853e-04 1.692827e-02 0.023449626 0.027096822
## address 9.709964e-03 1.460151e-02 0.004667391 0.044332185
## all 3.179064e-02 2.568483e-02 0.031405918 0.021928697
## num3d 3.564965e-03 1.068030e-03 0.003343485 0.010928852
## our 2.835892e-02 2.864497e-02 0.032311366 0.043127432
## over 1.409388e-02 3.109848e-02 0.024330392 0.002669307
## remove 1.880953e-02 3.168836e-02 0.034981046 0.046764497
## internet 1.105663e-02 2.165119e-02 0.029564174 0.028347606
## order 9.832825e-03 2.194160e-02 0.016484387 0.031089928
## mail 1.796832e-02 1.251542e-02 0.014346424 0.002322288
## receive 2.009403e-02 2.118151e-02 0.034470380 0.057802577
## will 5.269911e-03 2.747959e-02 0.030414906 0.034819391
## people 1.325945e-02 1.957206e-02 0.026641783 0.044720646
## report 5.175112e-02 1.504132e-02 0.019422668 0.001708036
## addresses 1.189611e-02 2.161836e-02 0.017148611 0.006227419
## free 1.898046e-02 2.612720e-02 0.028028954 0.041281177
## business 7.527992e-03 2.777412e-02 0.036755121 0.030050331
## email 2.642265e-02 3.039509e-02 0.040884295 0.035648846
## you 4.305611e-03 5.708895e-02 0.049059279 0.120076359
## credit 9.270122e-03 2.149944e-02 0.024959294 0.022689596
## your 1.813804e-02 4.815321e-02 0.059984600 0.076237209
## font 9.159848e-03 1.394118e-02 0.399378775 0.043697109
## num000 1.861102e-02 3.078800e-02 0.028201810 0.035515731
## money 1.147614e-02 1.731044e-02 0.017327020 0.029030237
## hp 3.416112e-03 7.878909e-03 0.036394060 0.136502537
## hpl 1.941274e-02 3.015458e-03 0.019216374 0.150143639
## george 9.691701e-03 1.135072e-02 0.025639552 0.029264755
## num650 7.988997e-03 1.020134e-02 0.023614441 0.289765958
## lab 1.704075e-03 1.558340e-03 0.019178061 0.146921423
## labs 3.373646e-03 3.846002e-04 0.022449725 0.227716362
## telnet 9.797627e-04 1.333670e-02 0.016914654 0.255881442
## num857 2.517480e-03 9.989861e-03 0.009312327 0.298967625
## data 3.167271e-03 6.960862e-03 0.006408173 0.018880998
## num415 2.321035e-03 1.038819e-02 0.009794377 0.297618843
## num85 2.026796e-02 8.109436e-03 0.020629535 0.186459752
## technology 1.579537e-03 2.253302e-02 0.019700900 0.237292687
## num1999 1.905138e-02 6.336512e-02 0.044604461 0.083196174
## parts 3.971741e-03 3.317312e-04 0.015016090 0.003154710
## pm 7.580668e-03 1.703227e-02 0.022824769 0.067157982
## direct 2.780664e-03 1.400227e-02 0.018721284 0.263205815
## cs 7.423030e-03 6.365934e-04 0.062589513 0.015365433
## meeting 1.251851e-02 8.906059e-04 0.007556851 0.020410549
## original 2.177568e-02 2.640286e-03 0.020560658 0.059974529
## project 3.339051e-03 8.596095e-06 0.006015503 0.007411853
## re 1.193851e-02 6.017755e-03 0.023032990 0.002491348
## edu 1.050721e-02 1.511428e-02 0.023341722 0.018011027
## table 0.000000e+00 6.205997e-03 0.001520502 0.001797937
## conference 6.205997e-03 0.000000e+00 0.002862612 0.010607209
## charSemicolon 1.520502e-03 2.862612e-03 0.000000000 0.059982418
## charRoundbracket 1.797937e-03 1.060721e-02 0.059982418 0.000000000
## charSquarebracket 3.734855e-03 8.107898e-03 0.009104759 0.021919083
## charExclamation 1.700925e-02 2.592801e-02 0.015300496 0.022042059
## charDollar 2.119594e-02 3.138020e-02 0.005217121 0.058225105
## charHash 3.417682e-05 1.020133e-02 0.059562708 0.038416073
## capitalAve 6.932980e-03 7.180517e-03 0.004409971 0.044615793
## capitalLong 1.026303e-02 1.510052e-02 0.049957164 0.431296288
## capitalTotal 9.816706e-04 6.490121e-03 0.070785879 0.157199305
## charSquarebracket charExclamation charDollar charHash
## make 3.209511e-02 0.053719412 0.090493681 6.957253e-03
## address 1.914401e-02 0.010047941 0.004906670 5.652416e-03
## all 2.538078e-02 0.097721623 0.083173895 1.420531e-02
## num3d 6.962042e-03 0.002271545 0.016427126 2.460491e-03
## our 2.512953e-02 0.022652501 0.051387610 8.578909e-03
## over 2.525279e-02 0.050127304 0.116330947 7.345910e-04
## remove 2.666380e-02 0.052732146 0.077013442 4.958380e-02
## internet 1.740288e-02 0.032029857 0.068971303 8.571457e-03
## order 5.044004e-03 0.036990272 0.160183404 1.006670e-04
## mail 2.322363e-04 0.025574843 0.064298896 4.700325e-02
## receive 2.972814e-02 0.024833733 0.074915892 5.154212e-03
## will 4.455737e-02 0.007914177 0.019137779 2.937600e-02
## people 2.733847e-02 0.043138964 0.188727334 1.469677e-02
## report 1.195500e-02 0.010675041 0.084370785 5.624260e-03
## addresses 9.863468e-03 0.009720701 0.120663334 3.606488e-03
## free 2.843119e-02 0.101384013 0.030032971 3.713804e-02
## business 3.351204e-02 0.069930532 0.106528945 3.104082e-03
## email 2.223230e-02 0.042878940 0.077914958 3.060596e-02
## you 6.129867e-02 0.155144473 0.093578911 3.496881e-03
## credit 1.168519e-02 0.057577450 0.053215397 1.247774e-02
## your 5.417629e-02 0.071457165 0.158340476 4.700013e-03
## font 4.303239e-05 0.004815566 0.007545806 1.998387e-01
## num000 2.912343e-02 0.067371022 0.330162221 1.317493e-02
## money 2.101517e-02 0.046251598 0.089143850 1.303144e-04
## hp 3.416152e-02 0.085773245 0.090358020 4.958737e-02
## hpl 6.697365e-02 0.081665090 0.087225900 2.191583e-02
## george 1.642894e-02 0.063983994 0.072911912 2.167426e-02
## num650 3.534754e-02 0.059859369 0.061774374 1.156290e-02
## lab 2.796885e-03 0.040759731 0.053702088 4.719951e-03
## labs 2.071753e-03 0.060062801 0.068030401 7.458554e-02
## telnet 4.651468e-03 0.045886413 0.054053923 4.101943e-03
## num857 1.223107e-02 0.039062809 0.045826239 1.155114e-02
## data 2.817705e-02 0.050186746 0.052370598 8.454593e-03
## num415 1.215930e-02 0.036232415 0.041677955 1.143203e-02
## num85 3.301251e-02 0.045258775 0.047697175 1.044601e-02
## technology 5.916613e-03 0.057132828 0.060309083 1.348315e-02
## num1999 6.281144e-02 0.054093189 0.069756101 2.625866e-02
## parts 6.730204e-03 0.011900021 0.011773125 2.593916e-03
## pm 4.765729e-02 0.020453516 0.048976191 1.154982e-02
## direct 1.005139e-02 0.029393359 0.016774625 9.841183e-03
## cs 2.859845e-02 0.024984469 0.039276565 1.240443e-02
## meeting 1.295316e-02 0.037308756 0.050385891 2.599370e-03
## original 9.682939e-02 0.046515412 0.058976631 1.581369e-02
## project 1.090554e-02 0.031749948 0.039248992 4.086810e-03
## re 2.932896e-03 0.054770386 0.053354907 2.432517e-02
## edu 4.998525e-03 0.035999571 0.052717618 1.542391e-02
## table 3.734855e-03 0.017009248 0.021195936 3.417682e-05
## conference 8.107898e-03 0.025928007 0.031380198 1.020133e-02
## charSemicolon 9.104759e-03 0.015300496 0.005217121 5.956271e-02
## charRoundbracket 2.191908e-02 0.022042059 0.058225105 3.841607e-02
## charSquarebracket 0.000000e+00 0.029249363 0.030682669 5.886359e-03
## charExclamation 2.924936e-02 0.000000000 0.129167245 2.109711e-02
## charDollar 3.068267e-02 0.129167245 0.000000000 1.579964e-02
## charHash 5.886359e-03 0.021097106 0.015799638 0.000000e+00
## capitalAve 1.001505e-02 0.046707513 0.094993968 1.660079e-02
## capitalLong 1.784020e-02 0.067158834 0.203780803 7.549290e-02
## capitalTotal 1.383735e-03 0.038068123 0.230750294 6.003455e-02
## capitalAve capitalLong capitalTotal
## make 0.0435220815 0.0549154680 0.0912654141
## address 0.0038561821 0.0023229052 0.0176072315
## all 0.0873688246 0.0931700634 0.0690902903
## num3d 0.0028276695 0.0165835615 0.0184738663
## our 0.0489703385 0.0433780635 0.0018717405
## over 0.0126508309 0.0669041663 0.0710082419
## remove 0.0421621344 0.0581702001 0.0030600818
## internet 0.0077655997 0.0318767972 0.0451350912
## order 0.1096683264 0.1669528786 0.2634103322
## mail 0.0614440165 0.0825353125 0.0889325803
## receive 0.0275166866 0.0784043294 0.1188771510
## will 0.0135086050 0.0128193293 0.0196889740
## people 0.0135874328 0.0389571187 0.1155530710
## report 0.0008744141 0.0453058252 0.1702989353
## addresses 0.0095910319 0.1819834471 0.1631348647
## free 0.0169321721 0.0252672103 0.0012965090
## business 0.0389990569 0.0596109230 0.0758939608
## email 0.0094770032 0.0600549632 0.0430068764
## you 0.0319921946 0.0007916675 0.0084561133
## credit 0.0757798881 0.1122742280 0.1084402805
## your 0.0323717590 0.0640745644 0.0497352041
## font 0.0205445940 0.0301670487 0.1343887259
## num000 0.0062829747 0.1149809427 0.1862564899
## money 0.0066877024 0.0333474118 0.0738845041
## hp 0.0175432622 0.0466030161 0.0415675008
## hpl 0.0239283002 0.0475831506 0.0598796453
## george 0.0249796876 0.0505768235 0.1033581926
## num650 0.0126263783 0.0346223720 0.0701874473
## lab 0.0151735807 0.0328240715 0.0613901596
## labs 0.0155502474 0.0343417473 0.0645956522
## telnet 0.0125336284 0.0280973452 0.0518984681
## num857 0.0105921410 0.0253624492 0.0493476759
## data 0.0162172097 0.0254745700 0.0188148121
## num415 0.0008320091 0.0217847983 0.0473999134
## num85 0.0131819981 0.0264418995 0.0438727797
## technology 0.0194833553 0.0357895420 0.0504042712
## num1999 0.0146827447 0.0329977885 0.0026661605
## parts 0.0052039767 0.0061709524 0.0094684095
## pm 0.0153536804 0.0297621970 0.0556118764
## direct 0.0066707680 0.0072497989 0.0293223782
## cs 0.0087762912 0.0223133309 0.0313670906
## meeting 0.0179702202 0.0331226474 0.0623956662
## original 0.0180063679 0.0193637445 0.0406035650
## project 0.0134046792 0.0249926102 0.0444952071
## re 0.0274184077 0.0488689285 0.1002696847
## edu 0.0173113035 0.0315777230 0.0503289753
## table 0.0069329800 0.0102630288 0.0009816706
## conference 0.0071805167 0.0151005224 0.0064901207
## charSemicolon 0.0044099706 0.0499571637 0.0707858785
## charRoundbracket 0.0446157934 0.4312962875 0.1571993054
## charSquarebracket 0.0100150514 0.0178402010 0.0013837348
## charExclamation 0.0467075133 0.0671588336 0.0380681232
## charDollar 0.0949939676 0.2037808031 0.2307502939
## charHash 0.0166007850 0.0754929024 0.0600345524
## capitalAve 0.0000000000 0.4859902008 0.1880284801
## capitalLong 0.4859902008 0.0000000000 0.5346867746
## capitalTotal 0.1880284801 0.5346867746 0.0000000000
which(M > 0.8, arr.ind=T)
## row col
## num857 32 31
## num415 34 31
## telnet 31 32
## num415 34 32
## direct 40 32
## telnet 31 34
## num857 32 34
## direct 40 34
## num857 32 40
## num415 34 40
Basic PCA idea * We might not need every predictor * a weighted combination of predictors might be better * We should pick this cobination to capture the “most information” possible * benefits + reduced number of predictors + reduced noise (due to averaging)
You have multipvaraite variables, * find a new set of multivariate variables that are uncorrelated and explain as much variance as possible. * if you put all the variables together in one matrix, find the best matrix created with fewer variables that explains the orginal data.
Correlated predictors
library(caret); library(kernlab); data(spam)
inTrain <- createDataPartition(y=spam$type, p=0.75, list=FALSE)
training <- spam[inTrain,]
testing <- spam[-inTrain,]
M <- abs(cor(training[,-58]))
diag(M) <- 0
which(M > 0.8, arr.ind = T)
## row col
## num415 34 32
## direct 40 32
## num857 32 34
## direct 40 34
## num857 32 40
## num415 34 40
names(spam)[c(34,32)]
## [1] "num415" "num857"
plot(spam[,34],spam[,32])
# We could rotate the plot
x <- 0.71 * training$num415 + 0.71* training$num857
y <- 0.71 * training$num415 - 0.71* training$num857
plot(x,y)
# the sum capture more information than subtraction
Related Problems
You have multivariate variables X1, …, Xn, so X11,….X1m * Find a new set of multivariate variables that are uncorrelated and explain as much variance as possible.
The first goal is statistical and the second goal is data compression.
Related solutions - PCA/ SVD
SVD if X is a matrix with each variable in a column and each observation in a row then the SVD is a “matrix decomposition”
X=UDV^T
where the columns of U are orthogonal (left singular vectors), the columns of V are orthogonal (right singluar vectors), and D is a diagonal matrix (singular values)
PCA The principal components are equal to the right singular values if you first scale (subtract the mean, divide by the standard deviation) the variables.
Principal components in R - prcomp
library(caret); library(kernlab); data(spam)
smallSpam <- spam[,c(34,32)]
prComp <- prcomp(smallSpam)
plot(prComp$x[,1],prComp$x[,2])
prComp$rotation # get the rotation matrx, how it summing up each component.
## PC1 PC2
## num415 0.7080625 0.7061498
## num857 0.7061498 -0.7080625
# PCA on SPAM data
library(caret); library(kernlab); data(spam)
typeColor <- ((spam$stype=="spam")*1+1) #spam is red?
preProc <- preProcess(log10(spam[,-58]+1), method="pca", pcaComp=2)
spamPC <- predict(preProc, log10(spam[,-58]+1))
plot(spamPC[,1],spamPC[,2],color=typeColor)
## Warning in plot.window(...): "color" is not a graphical parameter
## Warning in plot.xy(xy, type, ...): "color" is not a graphical parameter
## Warning in axis(side = side, at = at, labels = labels, ...): "color" is not a
## graphical parameter
## Warning in axis(side = side, at = at, labels = labels, ...): "color" is not a
## graphical parameter
## Warning in box(...): "color" is not a graphical parameter
## Warning in title(...): "color" is not a graphical parameter
# Preprocessing with PCA
library(caret); library(kernlab); data(spam)
inTrain <- createDataPartition(y=spam$type, p=0.75, list=FALSE)
training <- spam[inTrain,]
testing <- spam[-inTrain,]
preProc <- preProcess(log10(training[,-58]+1), method="pca", pcaComp=2)
trainPC <- predict(preProc, log10(training[,-58]+1))
# modelFit <- train(training$type ~., method="glm", data=trainPC)
#
# testPC <- predict(preProc, log(testing[,-58]+1))
#
# confusionMatrix(testing$type, predict(modelFit, testPC))
# Alternative
# modelFit <- train(training$type ~., method="glm", preProcess="pca", data=training)
# confusionMatrix(testing$type, predict(modelFit, testing))
Final thoughts on PCs
Key ideas * iteratively split variables into groups * evaluate “homogeneity” within each group * split again if necessary
Pros: * Easy to interpret * Better performance in nonlinear settings
Cons: * Without pruning/ cross-validation can lead to overfitting * Harder to estimate uncertainty * Results may be variable
Basic Algorithm
measures of impurity 1. misclassification error 2. gini index
# Example : iris data
data(iris); library(ggplot2)
names(iris)
## [1] "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" "Species"
table(iris$Species)
##
## setosa versicolor virginica
## 50 50 50
inTrain <- createDataPartition(y=iris$Species, p=0.7, list=F)
training <- iris[inTrain,]
testing <- iris[-inTrain,]
dim(training);dim(testing)
## [1] 105 5
## [1] 45 5
# qplot(Petal.Width, Sepal.Width, colour=Species, data=training)
library(caret)
modFit <- train(Species ~., method="rpart", data=training)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
print(modFit$finalModel) # tell me what all the node are and how they split
## n= 105
##
## node), split, n, loss, yval, (yprob)
## * denotes terminal node
##
## 1) root 105 70 setosa (0.3333333 0.3333333 0.3333333)
## 2) Petal.Length< 2.5 35 0 setosa (1.0000000 0.0000000 0.0000000) *
## 3) Petal.Length>=2.5 70 35 versicolor (0.0000000 0.5000000 0.5000000)
## 6) Petal.Width< 1.75 40 5 versicolor (0.0000000 0.8750000 0.1250000) *
## 7) Petal.Width>=1.75 30 0 virginica (0.0000000 0.0000000 1.0000000) *
# plot tree
plot(modFit$finalModel, uniform=T, main="Classification Tree")
text(modFit$finalModel, use.n=T, all=T, cex=.8)
# Prettier plots
# install.packages("rattle")
library(rattle)
## Loading required package: tibble
## Loading required package: bitops
## debugging in: ls(env, pattern = p, all.names = TRUE)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## debug: grep(pattern, all.names, value = TRUE)
## exiting from: ls(env, pattern = p, all.names = TRUE)
## Rattle: A free graphical interface for data science with R.
## Version 5.5.1 Copyright (c) 2006-2021 Togaware Pty Ltd.
## Type 'rattle()' to shake, rattle, and roll your data.
fancyRpartPlot(modFit$finalModel)
# Predicting new values
predict(modFit, newdata=testing)
## [1] setosa setosa setosa setosa setosa setosa
## [7] setosa setosa setosa setosa setosa setosa
## [13] setosa setosa setosa versicolor versicolor versicolor
## [19] versicolor virginica versicolor versicolor versicolor versicolor
## [25] versicolor versicolor versicolor versicolor versicolor versicolor
## [31] virginica virginica virginica virginica virginica virginica
## [37] virginica virginica virginica virginica virginica virginica
## [43] virginica virginica virginica
## Levels: setosa versicolor virginica
Notes and further resources * Classification trees are non-linear models + They use interactions between variables + Data transformations may be less important (monotone transformations ) + trees can also be used for regression problems (continuous outcome) * Note that three are multiple tree building options in R both in the caret package - party ,rpart and out of the caret package - tree
Bootstrap aggregating (bagging)
Basic idea : 1. Resample cases and recalculate predictions 2. Average or majority vote
Notes: 1. similar bias 2. Reduced varaince 3. More useful for non-linear functions
Bagging is most useful for nonlinear models
Pros: Accuracy
Cons: speed interpretabiliyt overfitting
data(iris); library(ggplot2)
inTrain <- createDataPartition(y=iris$Species, p=0.7, list=F)
training <- iris[inTrain,]
testing <- iris[-inTrain,]
library(caret)
library(randomForest)
## randomForest 4.7-1.1
## Type rfNews() to see new features/changes/bug fixes.
##
## Attaching package: 'randomForest'
## The following object is masked from 'package:rattle':
##
## importance
## The following object is masked from 'package:ggplot2':
##
## margin
## The following object is masked from 'package:dplyr':
##
## combine
modFit <- train ( Species ~., data=training, method="rf", prox=T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
modFit
## Random Forest
##
## 105 samples
## 4 predictor
## 3 classes: 'setosa', 'versicolor', 'virginica'
##
## No pre-processing
## Resampling: Bootstrapped (25 reps)
## Summary of sample sizes: 105, 105, 105, 105, 105, 105, ...
## Resampling results across tuning parameters:
##
## mtry Accuracy Kappa
## 2 0.9428762 0.9130450
## 3 0.9438762 0.9145208
## 4 0.9419160 0.9115092
##
## Accuracy was used to select the optimal model using the largest value.
## The final value used for the model was mtry = 3.
getTree(modFit$finalModel, k=2) # see the secon tree.
## left daughter right daughter split var split point status prediction
## 1 2 3 3 2.70 1 0
## 2 0 0 0 0.00 -1 1
## 3 4 5 3 4.75 1 0
## 4 6 7 4 1.65 1 0
## 5 8 9 4 1.75 1 0
## 6 0 0 0 0.00 -1 2
## 7 0 0 0 0.00 -1 3
## 8 10 11 4 1.55 1 0
## 9 0 0 0 0.00 -1 3
## 10 0 0 0 0.00 -1 3
## 11 0 0 0 0.00 -1 2
pred <- predict(modFit, testing)
Note random forest are usually one of the two top performing algorithms along with boosting in prediction contests. random forest are difficult to interpret but often very accurate care should be taken to avoid overfitting.
Basic ideas 1. take lots of (possibly) weak predictors 2. Weight them and add them up 3. get a stronger predictor
ada boost
Boosting in R Boosting can be used wiht any subset of classifiers One Large subclass is gradient boosting R packages: gbm - boosting with trees. mboost - model based boosting ada - statistical boosting based on additive logistic regression gamBoost for boosting generalized additive models
Wage example
library(ISLR); data(Wage); library(ggplot2); library(caret);
Wage <- subset(Wage, select=-c(logwage))
inTrain <- createDataPartition(y=Wage$wage, p=0.7, list=F)
training <- Wage[inTrain,]
testing <- Wage[-inTrain,]
# Fit the model
modFit <- train(wage~., method="gbm", data=training, verbose=F)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 14: region2. Middle Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 15: region3. East North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 16: region4. West North Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 17: region5. South Atlantic has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 18: region6. East South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 19: region7. West South Central has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 20: region8. Mountain has no variation.
## Warning in (function (x, y, offset = NULL, misc = NULL, distribution =
## "bernoulli", : variable 21: region9. Pacific has no variation.
print(modFit)
## Stochastic Gradient Boosting
##
## 2102 samples
## 9 predictor
##
## No pre-processing
## Resampling: Bootstrapped (25 reps)
## Summary of sample sizes: 2102, 2102, 2102, 2102, 2102, 2102, ...
## Resampling results across tuning parameters:
##
## interaction.depth n.trees RMSE Rsquared MAE
## 1 50 34.13574 0.3250466 23.48468
## 1 100 33.55827 0.3364646 23.07470
## 1 150 33.46319 0.3386295 23.05979
## 2 50 33.52205 0.3391159 22.99846
## 2 100 33.36828 0.3421410 22.98541
## 2 150 33.37424 0.3422357 23.01802
## 3 50 33.35803 0.3433466 22.89738
## 3 100 33.36546 0.3425059 23.01313
## 3 150 33.48957 0.3386288 23.17279
##
## Tuning parameter 'shrinkage' was held constant at a value of 0.1
##
## Tuning parameter 'n.minobsinnode' was held constant at a value of 10
## RMSE was used to select the optimal model using the smallest value.
## The final values used for the model were n.trees = 50, interaction.depth =
## 3, shrinkage = 0.1 and n.minobsinnode = 10.
basic idea 1. assume the data follow a probabilistic model 2. use bayes’ theorem to identify optimal classifiers
Pros: can take advantage of structure of the data may be computationally convenient arereasonably accurate on real problems
cons: make additional assumptions about the data when the model is incorrect you may get reduced accuracy
A range of models use this approach linear discriminant analysis assumes … is multivariate gaussian with same covariances quadratic discrimant analysis assume .. is multivariate gaussian with different covariance model based prediciton assume more complicate version for the covariance matrix naive abyes assumes independence between features for model building.
data(iris); library(ggplot2)
names(iris)
## [1] "Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" "Species"
table(iris$Species)
##
## setosa versicolor virginica
## 50 50 50
inTrain <- createDataPartition(y=iris$Species, p=0.7, list=F)
training <- iris[inTrain,]
testing <- iris[-inTrain,]
modlda = train(Species ~., data=training, method="lda")
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
modnb=train(Species~., data=training, method="nb")
## debugging in: ls(env, pattern = p, all.names = TRUE)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## debug: grep(pattern, all.names, value = TRUE)
## exiting from: ls(env, pattern = p, all.names = TRUE)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## debugging in: ls(vars, all.names = T)
## debug: {
## if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## all.names <- .Internal(ls(envir, all.names, sorted))
## if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) &&
## ll != length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## }
## else all.names
## }
## debug: if (!missing(name)) {
## pos <- tryCatch(name, error = function(e) e)
## if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string",
## sQuote(name)), domain = NA)
## pos <- name
## }
## }
## debug: pos <- tryCatch(name, error = function(e) e)
## debug: if (inherits(pos, "error")) {
## name <- substitute(name)
## if (!is.character(name))
## name <- deparse(name)
## warning(gettextf("%s converted to character string", sQuote(name)),
## domain = NA)
## pos <- name
## }
## debug: all.names <- .Internal(ls(envir, all.names, sorted))
## debug: if (!missing(pattern)) {
## if ((ll <- length(grep("[", pattern, fixed = TRUE))) && ll !=
## length(grep("]", pattern, fixed = TRUE))) {
## if (pattern == "[") {
## pattern <- "\\["
## warning("replaced regular expression pattern '[' by '\\\\['")
## }
## else if (length(grep("[^\\\\]\\[<-", pattern))) {
## pattern <- sub("\\[<-", "\\\\\\[<-", pattern)
## warning("replaced '[<-' by '\\\\[<-' in regular expression pattern")
## }
## }
## grep(pattern, all.names, value = TRUE)
## } else all.names
## debug: all.names
## exiting from: ls(vars, all.names = T)
## Warning in FUN(X[[i]], ...): Numerical 0 probability for all classes with
## observation 15
plda=predict(modlda, testing)
pnb= predict(modnb,testing)
table(plda, pnb)
## pnb
## plda setosa versicolor virginica
## setosa 15 0 0
## versicolor 0 14 0
## virginica 0 1 15
## Week 8.4 Regularized regression
regularized regression
Basic idea * Fit a regression model * Penalize ( or shrink) large coefficients
Pros: can help with the bias/variance tradeoff can help with model selection
Cons: May be computationally demanding on large data sets Does not perform as well as random forests and boosting
Combining predictors